Introduction |
|
1 | (4) |
|
|
|
|
5 | (12) |
|
|
5 | (2) |
|
Getting to Know the Features of WPF |
|
|
7 | (3) |
|
|
10 | (1) |
|
Comparing WPF to Other Options |
|
|
11 | (1) |
|
The Pieces of .NET Framework |
|
|
12 | (1) |
|
|
13 | (1) |
|
Constrasting WPF with Silverlight |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (10) |
|
|
17 | (2) |
|
|
19 | (5) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (2) |
|
Introducing the Font Viewer |
|
|
27 | (14) |
|
|
27 | (12) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
39 | (2) |
|
Handling Application Layout |
|
|
41 | (18) |
|
|
41 | (1) |
|
Using Alignment and Margin |
|
|
42 | (3) |
|
Using Panels to Create Dynamic Layouts |
|
|
45 | (1) |
|
|
45 | (2) |
|
|
47 | (2) |
|
|
49 | (3) |
|
Understanding How WrapPanel Works |
|
|
52 | (1) |
|
Exploit Canvas for Precision Layout |
|
|
53 | (1) |
|
Enhancing a UI with Decorators |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
57 | (2) |
|
|
59 | (16) |
|
|
59 | (1) |
|
|
60 | (1) |
|
Displaying Rich Text with the TextBlock |
|
|
60 | (1) |
|
Gathering Text from the User |
|
|
61 | (3) |
|
Accessing Controls with a Label |
|
|
64 | (3) |
|
|
67 | (1) |
|
Triggering Actions with a Button |
|
|
67 | (1) |
|
Making Choices with ToggleButtons |
|
|
68 | (3) |
|
Displaying a List with ListBox |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (2) |
|
|
75 | (18) |
|
|
75 | (1) |
|
Binding Two Controls Together |
|
|
76 | (2) |
|
|
78 | (7) |
|
Demonstrating Automatic Change Notification |
|
|
85 | (4) |
|
Another Data Binding Syntax |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
90 | (3) |
|
Part II: Reaching the User |
|
|
|
|
93 | (14) |
|
|
93 | (5) |
|
|
98 | (2) |
|
|
100 | (4) |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
105 | (2) |
|
Building a Text Document Editor |
|
|
107 | (14) |
|
|
107 | (1) |
|
Creating the Application Layout |
|
|
108 | (1) |
|
Adding Usability with ToolBars |
|
|
109 | (1) |
|
Increasing Maintainability with User Controls |
|
|
110 | (3) |
|
|
113 | (2) |
|
Working with Rich TextBox |
|
|
115 | (3) |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
119 | (2) |
|
Getting a Handle on Events |
|
|
121 | (24) |
|
|
121 | (6) |
|
|
127 | (1) |
|
Handling Events in the Text Editor |
|
|
128 | (3) |
|
Making the Text Editor Work as Expected |
|
|
131 | (8) |
|
|
139 | (3) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
142 | (3) |
|
|
145 | (12) |
|
|
145 | (1) |
|
|
146 | (2) |
|
Binding Commands to the Menu |
|
|
148 | (1) |
|
|
149 | (2) |
|
Adding More Commands to the Text Editor |
|
|
151 | (2) |
|
Determining If a Command Is Available |
|
|
153 | (1) |
|
Creating an Input Binding |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (20) |
|
Making the Text Editor Print |
|
|
157 | (1) |
|
Implementing a Custom Document Paginator |
|
|
158 | (3) |
|
Developing a Print Manager |
|
|
161 | (3) |
|
|
164 | (4) |
|
|
168 | (4) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (4) |
|
Part III: Visualizing Data |
|
|
|
Building a Contact Manager |
|
|
177 | (16) |
|
|
177 | (1) |
|
|
178 | (1) |
|
Creating the Solution and Application Shell |
|
|
179 | (3) |
|
|
182 | (6) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
191 | (2) |
|
|
193 | (18) |
|
Creating a Custom Base Class for Presenters |
|
|
193 | (1) |
|
Completing the Tab UI Infrastructure |
|
|
194 | (2) |
|
Implementing the Application Presenter |
|
|
196 | (4) |
|
|
200 | (1) |
|
Building an Edit Contact Screen |
|
|
201 | (6) |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
208 | (3) |
|
|
211 | (18) |
|
|
211 | (2) |
|
|
213 | (1) |
|
Using Resources in the UI |
|
|
214 | (2) |
|
|
216 | (1) |
|
|
217 | (3) |
|
|
220 | (6) |
|
|
226 | (1) |
|
|
227 | (1) |
|
|
227 | (1) |
|
|
228 | (1) |
|
Digging Deeper into Data Binding |
|
|
229 | (22) |
|
Handling Advanced Data Binding Scenarios |
|
|
229 | (3) |
|
|
232 | (2) |
|
Observing Change in Collections |
|
|
234 | (5) |
|
|
239 | (8) |
|
Understanding Collection Views |
|
|
247 | (2) |
|
|
249 | (1) |
|
|
249 | (1) |
|
|
250 | (1) |
|
|
251 | (16) |
|
|
251 | (1) |
|
|
252 | (4) |
|
|
256 | (4) |
|
|
260 | (1) |
|
|
260 | (2) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
262 | (5) |
|
Part IV: Creating Rich Experiences |
|
|
|
|
267 | (24) |
|
Defining the Requirements |
|
|
267 | (1) |
|
|
268 | (3) |
|
Implementing the Menu Screen |
|
|
271 | (3) |
|
|
274 | (3) |
|
Creating the Picture Screen |
|
|
277 | (5) |
|
|
282 | (4) |
|
Finalizing the Media Player Functionality |
|
|
286 | (3) |
|
|
289 | (1) |
|
|
289 | (1) |
|
|
289 | (2) |
|
|
291 | (24) |
|
|
291 | (12) |
|
Styling the Media Controls |
|
|
303 | (3) |
|
Paths and Complex Drawings |
|
|
306 | (4) |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
312 | (3) |
|
|
315 | (16) |
|
|
315 | (1) |
|
|
316 | (2) |
|
|
318 | (1) |
|
Leveraging LinearGradientBrush |
|
|
319 | (2) |
|
Working with RadialGradientBrush |
|
|
321 | (2) |
|
Understanding DrawingBrush |
|
|
323 | (3) |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
328 | (1) |
|
|
328 | (3) |
|
|
331 | (16) |
|
|
331 | (4) |
|
Differentiating Render and Layout Transforms |
|
|
335 | (2) |
|
Adding Transforms to the Media Viewer |
|
|
337 | (2) |
|
|
339 | (3) |
|
Adding a BitmapEffect to the Media Viewer |
|
|
342 | (2) |
|
|
344 | (1) |
|
|
344 | (1) |
|
|
344 | (3) |
|
|
347 | (22) |
|
Understanding Control Templates |
|
|
347 | (4) |
|
Telling the Template What to Do |
|
|
351 | (2) |
|
Adding Templates to Our Application |
|
|
353 | (5) |
|
Identifying Special Parts in Templates |
|
|
358 | (4) |
|
Creating a Flexible Template |
|
|
362 | (4) |
|
The Benefit of Control Templates |
|
|
366 | (1) |
|
|
366 | (1) |
|
|
366 | (1) |
|
|
367 | (2) |
|
|
369 | (14) |
|
|
369 | (4) |
|
|
373 | (4) |
|
Adding Animation with EventTrigger |
|
|
377 | (3) |
|
Understanding Trigger Restrictions |
|
|
380 | (1) |
|
Advanced Trigger Scenarios |
|
|
380 | (1) |
|
|
381 | (1) |
|
|
382 | (1) |
|
|
382 | (1) |
|
|
383 | (24) |
|
Understanding Animation in General |
|
|
383 | (1) |
|
Understanding Animation in WPF |
|
|
384 | (4) |
|
Animations in the Media Viewer |
|
|
388 | (2) |
|
Resolving the Target Property |
|
|
390 | (1) |
|
Where to Put Your Animations |
|
|
391 | (1) |
|
Achieving the Desired Effect |
|
|
392 | (2) |
|
Animating with Key Frames |
|
|
394 | (2) |
|
|
396 | (2) |
|
|
398 | (2) |
|
Alternative Animation Techniques |
|
|
400 | (1) |
|
|
400 | (1) |
|
Applying Animations to Media Viewer |
|
|
401 | (4) |
|
|
405 | (1) |
|
|
405 | (1) |
|
|
406 | (1) |
|
|
407 | (32) |
|
|
407 | (5) |
|
UI Design and Architecture Concerns |
|
|
412 | (2) |
|
|
414 | (3) |
|
|
417 | (1) |
|
|
418 | (1) |
|
|
418 | (1) |
|
|
419 | (4) |
|
|
|
Appendix A: Tools and Resources |
|
|
423 | (4) |
|
|
423 | (1) |
|
|
424 | (1) |
|
|
424 | (1) |
|
|
425 | (1) |
|
|
426 | (1) |
|
Appendix B: 3D Tutorial Using ZAM 3D |
|
|
427 | (10) |
|
Understanding the Interface |
|
|
427 | (1) |
|
|
428 | (9) |
|
Appendix C: Project Source (downloadable) |
|
|
437 | (2) |
Index |
|
439 | |