Introduction |
|
xv | |
Hardware Requirements |
|
xvi | |
Software Requirements |
|
xvii | |
Using the Companion Media |
|
xvii | |
Microsoft Certified Professional Program |
|
xix | |
Support for This Book |
|
xx | |
We Want to Hear from You |
|
xx | |
|
Chapter 1 Building a User Interface |
|
|
1 | (74) |
|
Lesson 1 Using WPF Controls |
|
|
3 | (38) |
|
|
3 | (1) |
|
|
4 | (3) |
|
|
7 | (5) |
|
Setting the Tab Order for Controls |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
TreeView Control and TreeViewItem Control |
|
|
14 | (1) |
|
|
15 | (2) |
|
|
17 | (2) |
|
|
19 | (1) |
|
|
19 | (1) |
|
Control Layout Properties |
|
|
19 | (2) |
|
Using Attached Properties |
|
|
21 | (1) |
|
|
22 | (9) |
|
Accessing Child Elements Programmatically |
|
|
31 | (1) |
|
|
32 | (9) |
|
|
41 | (16) |
|
|
41 | (2) |
|
|
43 | (3) |
|
|
46 | (4) |
|
Creating a Resource Dictionary |
|
|
50 | (1) |
|
Retrieving Resources in Code |
|
|
51 | (6) |
|
Lesson 3 Using Styles and Triggers |
|
|
57 | (18) |
|
|
57 | (6) |
|
|
63 | (3) |
|
Understanding Property Value Precedence |
|
|
66 | (9) |
|
Chapter 2 Working with Events and Commands |
|
|
75 | (44) |
|
Lesson 1 Configuring Events and Event Handling |
|
|
77 | (12) |
|
|
78 | (1) |
|
|
79 | (1) |
|
Attaching an Event Handler |
|
|
80 | (1) |
|
|
81 | (1) |
|
Defining a New Routed Event |
|
|
81 | (2) |
|
Creating a Class-Level Event Handler |
|
|
83 | (1) |
|
|
83 | (6) |
|
Lesson 2 Configuring Commands |
|
|
89 | (13) |
|
A High-Level Procedure for Implementing a Command |
|
|
90 | (1) |
|
|
90 | (2) |
|
Command Handlers and Command Bindings |
|
|
92 | (3) |
|
|
95 | (7) |
|
Lesson 3 Implementing Animation |
|
|
102 | (17) |
|
|
102 | (17) |
|
Chapter 3 Adding and Managing Content |
|
|
119 | (38) |
|
Lesson 1 Managing the Visual Interface |
|
|
121 | (23) |
|
|
121 | (7) |
|
|
128 | (5) |
|
|
133 | (3) |
|
|
136 | (3) |
|
Adding to and Removing Controls from the Visual Interface at Run Time |
|
|
139 | (5) |
|
Lesson 2 Adding Multimedia Content |
|
|
144 | (13) |
|
|
144 | (3) |
|
MediaPlayer and MediaElement |
|
|
147 | (3) |
|
Handling Media-Specific Events |
|
|
150 | (7) |
|
Chapter 4 Windows Forms and Windows Forms Controls |
|
|
157 | (116) |
|
Lesson 1 Working with Windows Forms and Container Controls |
|
|
159 | (32) |
|
Overview of Windows Forms |
|
|
159 | (1) |
|
Adding Forms to Your Project |
|
|
160 | (1) |
|
Properties of Windows Forms |
|
|
161 | (2) |
|
Modifying the Appearance and Behavior of the Form |
|
|
163 | (7) |
|
Overview of Container Controls |
|
|
170 | (3) |
|
|
173 | (1) |
|
|
173 | (1) |
|
The FlowLayoutPanel Control |
|
|
174 | (2) |
|
The TableLayoutPanel Control |
|
|
176 | (3) |
|
|
179 | (2) |
|
The SplitContainer Control |
|
|
181 | (10) |
|
Lesson 2 Configuring Controls in Windows Forms |
|
|
191 | (21) |
|
|
191 | (2) |
|
Configuring Controls at Design Time |
|
|
193 | (3) |
|
Modifying Control Properties at Design Time |
|
|
196 | (1) |
|
|
197 | (4) |
|
|
201 | (1) |
|
Creating Access Keys for Controls without Using Label Controls |
|
|
202 | (1) |
|
|
203 | (1) |
|
The MaskedTextBox Control |
|
|
204 | (8) |
|
Lesson 3 Using List-Display and Specialized Controls |
|
|
212 | (32) |
|
Overview of List Based Controls |
|
|
212 | (1) |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
214 | (2) |
|
Adding Items to and Removing Items from a List-Based Control |
|
|
216 | (7) |
|
|
223 | (2) |
|
|
225 | (3) |
|
|
228 | (1) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
233 | (2) |
|
|
235 | (1) |
|
|
235 | (1) |
|
|
236 | (8) |
|
Lesson 4 Using Tool Strips and Menus |
|
|
244 | (29) |
|
Overview of the ToolStrip Control |
|
|
244 | (2) |
|
|
246 | (2) |
|
Displaying Images on Tool Strip Items |
|
|
248 | (1) |
|
The ToolStripContainer Class |
|
|
249 | (1) |
|
|
249 | (2) |
|
Overview of the MenuStrip Control |
|
|
251 | (2) |
|
Creating Menu Strips and Tool Strip Menu Items |
|
|
253 | (3) |
|
Adding Enhancements to Menus |
|
|
256 | (2) |
|
Moving Items between Menus |
|
|
258 | (1) |
|
Disabling, Hiding, and Deleting Menu Items |
|
|
259 | (1) |
|
|
260 | (1) |
|
Switching between MenuStrip Controls Programmatically |
|
|
261 | (1) |
|
Context Menus and the ContextMenuStrip Control |
|
|
261 | (12) |
|
Chapter 5 Working with User-Defined Controls |
|
|
273 | (42) |
|
Lesson 1 Creating Controls in Windows Forms |
|
|
275 | (13) |
|
Introduction to Composite Controls |
|
|
275 | (7) |
|
Creating Extended Controls |
|
|
282 | (6) |
|
Lesson 2 Using Control Templates |
|
|
288 | (12) |
|
Creating Control Templates |
|
|
288 | (3) |
|
Inserting a Trigger Object in a Template |
|
|
291 | (1) |
|
Respecting the Templated Parent's Properties |
|
|
292 | (2) |
|
Applying Templates with Style |
|
|
294 | (1) |
|
Viewing the Source Code for an Existing Template |
|
|
294 | (1) |
|
Using Predefined Part Names in a Template |
|
|
295 | (5) |
|
Lesson 3 Creating Custom Controls in WPF |
|
|
300 | (15) |
|
|
300 | (1) |
|
Choosing among User Controls, Custom Controls, and Templates |
|
|
300 | (1) |
|
Implementing and Registering Dependency Properties |
|
|
301 | (2) |
|
|
303 | (1) |
|
|
304 | (1) |
|
Consuming User Controls and Custom Controls |
|
|
304 | (1) |
|
Rendering a Theme-Based Appearance |
|
|
305 | (10) |
|
Chapter 6 Working with Data Binding |
|
|
315 | (52) |
|
Lesson 1 Configuring Data Binding |
|
|
317 | (11) |
|
|
317 | (1) |
|
|
318 | (2) |
|
|
320 | (3) |
|
|
323 | (1) |
|
Binding to a Nullable Value |
|
|
323 | (1) |
|
Setting the UpdateSourceTrigger Property |
|
|
324 | (4) |
|
|
328 | (18) |
|
Implementing IValueConverter |
|
|
328 | (7) |
|
Using Converters to Return Objects |
|
|
335 | (1) |
|
Localizing Data with Converters |
|
|
336 | (2) |
|
Using Multi-value Converters |
|
|
338 | (8) |
|
Lesson 3 Validating Data and Configuring Change Notification |
|
|
346 | (21) |
|
|
346 | (4) |
|
Configuring Data Change Notification |
|
|
350 | (17) |
|
Chapter 7 Configuring Data Binding |
|
|
367 | (40) |
|
Lesson 1 Binding to Data Sources |
|
|
369 | (16) |
|
|
369 | (4) |
|
Binding to ADO.NET Objects |
|
|
373 | (3) |
|
Binding to Hierarchical Data |
|
|
376 | (2) |
|
Binding to an Object with ObjectDataProvider |
|
|
378 | (1) |
|
Binding to XML Using XmlDataProvider |
|
|
379 | (6) |
|
Lesson 2 Manipulating and Displaying Data |
|
|
385 | (22) |
|
|
385 | (9) |
|
|
394 | (2) |
|
|
396 | (3) |
|
|
399 | (8) |
|
Chapter 8 Working with Data Grids and Validating User Input |
|
|
407 | (40) |
|
Lesson 1 Implementing Data-bound Controls in Windows Forms |
|
|
409 | (18) |
|
|
409 | (3) |
|
Configuring DataGridView Columns |
|
|
412 | (1) |
|
Adding Tables and Columns to DataGridView |
|
|
413 | (1) |
|
Deleting Columns in DataGridView |
|
|
413 | (1) |
|
Determining the Clicked Cell in DataGridView |
|
|
414 | (1) |
|
Validating Input in the DataGridView Control |
|
|
414 | (2) |
|
Format a DataGridView Control by Using Custom Painting |
|
|
416 | (1) |
|
Using DataGrid in WPF Applications |
|
|
417 | (1) |
|
|
418 | (9) |
|
Lesson 2 Validating User Input |
|
|
427 | (20) |
|
|
427 | (2) |
|
Using Events in Field-Level Validation |
|
|
429 | (2) |
|
|
431 | (2) |
|
|
433 | (1) |
|
|
434 | (2) |
|
Implementing IDataErrorInfo in WPF Applications |
|
|
436 | (11) |
|
Chapter 9 Enhancing Usability |
|
|
447 | (46) |
|
Lesson 1 Implementing Asynchronous Processing |
|
|
449 | (19) |
|
Running a Background Process |
|
|
450 | (6) |
|
|
456 | (4) |
|
|
460 | (4) |
|
Using Dispatcher to Access Controls Safely on Another Thread in WPF |
|
|
464 | (4) |
|
Lesson 2 Implementing Globalization and Localization |
|
|
468 | (15) |
|
Globalization and Localization |
|
|
468 | (4) |
|
Localizing a WPF application |
|
|
472 | (1) |
|
Localizing an Application |
|
|
472 | (4) |
|
Using Culture Settings in Validators and Converters |
|
|
476 | (7) |
|
Lesson 3 Integrating Windows Forms Controls and WPF Controls |
|
|
483 | (10) |
|
Using Windows Forms Controls in WPF Applications |
|
|
483 | (1) |
|
Using Dialog Boxes in WPF Applications |
|
|
483 | (2) |
|
|
485 | (2) |
|
Adding a WPF User Control to Your Windows Form Project |
|
|
487 | (6) |
|
Chapter 10 Advanced Topics |
|
|
493 | (28) |
|
Lesson 1 Working with Security |
|
|
495 | (8) |
|
Working with Code Access Security Policies |
|
|
497 | (1) |
|
Requesting User Account Control Permissions |
|
|
498 | (1) |
|
Software Restriction Policies |
|
|
499 | (4) |
|
Lesson 2 Managing Settings |
|
|
503 | (7) |
|
Creating Settings at Design Time |
|
|
504 | (1) |
|
Loading Settings at Run Time |
|
|
504 | (1) |
|
Saving User Settings at Run Time |
|
|
505 | (5) |
|
Lesson 3 Implementing Drag and Drop |
|
|
510 | (11) |
|
Implementing Drag and Drop Functionality |
|
|
510 | (11) |
|
Chapter 11 Testing and Debugging WPF Applications |
|
|
521 | (24) |
|
Lesson 1 Testing the User Interface |
|
|
523 | (10) |
|
Using Automation Peers to Automate the User Interface |
|
|
523 | (4) |
|
Using the WPF Tree Visualizer to Inspect the User Interface |
|
|
527 | (6) |
|
Lesson 2 Debugging with Intellitrace and PresentationTraceSources |
|
|
533 | (12) |
|
|
533 | (2) |
|
Using PresentationTraceSources |
|
|
535 | (10) |
|
|
545 | (62) |
|
Lesson 1 Creating a Windows Setup Project |
|
|
547 | (12) |
|
|
547 | (12) |
|
Lesson 2 Deploying Applications with ClickOnce |
|
|
559 | (48) |
|
|
559 | (3) |
|
Configuring ClickOnce Update Options |
|
|
562 | (3) |
|
Deploying an XBAP with ClickOnce |
|
|
565 | (1) |
|
Configuring the Application Manifest |
|
|
566 | (1) |
|
Associating a Certificate with the Application |
|
|
567 | (40) |
Index |
|
607 | |