Introduction p. 1 Who Should Read This Book? p. 2 Software Requirements p. 3 Code Examples p. 3 How This Book Is Organized p. 4 Conventions Used in This Book p. 6 Background Why WPF? p. 7 A Look at the Past p. 8 Enter WPF p. 9 The Evolution of WPF p. 12 Summary p. 16 XAML Demystified p. 17 XAML Defined p. 19 Elements and Attributes p. 20 Namespaces p. 22 Property Elements p. 25 Type Converters p. 26 Markup Extensions p. 28 Children of Object Elements p. 31 Mixing XAML with Procedural Code p. 36 XAML2009 p. 44 XAML Keywords p. 49 Summary p. 52 WPF Fundamentals p. 55 A Tour of the Class Hierarchy p. 55 Logical and Visual Trees p. 57 Dependency Properties p. 62 Summary p. 76 Building a WPF Application Sizing, Positioning, and Transforming Elements p. 77 Controlling Size p. 78 Controlling Position p. 83 Applying Transforms p. 86 Summary p. 95 Layout with Panels p. 97 Canvas p. 98 StackPanel p. 100 WrapPanel p. 102 DockPanel p. 105 Grid p. 108
Primitive Panels p. 120 Handling Content Overflow p. 122 Putting It All Together: Creating a Visual Studio-Like Collapsible, Dockable, Resizable Pane p. 130 Summary p. 140 Input Events: Keyboard, Mouse, Stylus, and Touch p. 141 Routed Events p. 141 Keyboard Events p. 150 Mouse Events p. 152 Stylus Events p. 156 Touch Events p. 158 Commands p. 170 Summary p. 176 Structuring and Deploying an Application p. 177 Standard Desktop Applications p. 177 Navigation-Based Desktop Applications p. 193 Gadget-Style Applications p. 205 XAML Browser Applications p. 207 Loose XAML Pages p. 213 Summary p. 215 Exploiting Windows Desktop Features p. 217 Jump Lists p. 217 Taskbar Item Customizations p. 229 Aero Glass p. 233 TaskDialog p. 236 Summary p. 239 Controls Content Controls p. 241 Buttons p. 243 Simple Containers p. 248 Containers with Headers p. 252 Summary p. 254 Items Controls p. 255 Common Functionality p. 256 Selectors p. 261 Menus p. 298 Other Items Controls p. 302 Summary p. 308 Images, Text, and Other Controls p. 309 The Image Control p. 309 Text and Ink Controls p. 311 Documents p. 318
Range Controls p. 334 Calendar Controls p. 336 Summary p. 340 Features for Professional Developers Resources p. 341 Binary Resources p. 341 Logical Resources p. 349 Summary p. 360 Data Binding p. 361 Introducing the Binding Object p. 361 Controlling Rendering p. 373 Customizing the View of a Collection p. 385 Data Providers p. 396 Advanced Topics p. 403 Putting It All Together: The Pure-XAML Twitter Client p. 412 Summary p. 414 Styles, Templates, Skins, and Themes p. 415 Styles p. 416 Templates p. 430 Skins p. 458 Themes p. 465 Summary p. 470 Rich Media 2D Graphics p. 473 Drawings p. 474 Visuals p. 491 Shapes p. 503 Brushes p. 511 Effects p. 527 Improving Rendering Performance p. 530 Summary p. 533 3D Graphics p. 535 Getting Started with 3D Graphics p. 536 Cameras and Coordinate Systems p. 540 Transform3D p. 552 Model3D p. 561 Visual3D p. 584 Viewport3D p. 591 2D and 3D Coordinate System Transformation p. 594 Summary p. 603 Animation p. 605
Animations in Procedural Code p. 606 Animations in XAML p. 619 Keyframe Animations p. 628 Easing Functions p. 635 Animations and the Visual State Manager p. 641 Summary p. 649 Audio, Video, and Speech p. 651 Audio p. 651 Video p. 656 Speech p. 662 Summary p. 669 Advanced Topics Interoperability with Non-WPF Technologies p. 671 Embedding Win32 Controls in WPF Applications p. 673 Embedding WPF Controls in Win32 Applications p. 688 Embedding Windows Forms Controls in WPF Applications p. 695 Embedding WPF Controls in Windows Forms Applications p. 700 Mixing DirectX Content with WPF Content p. 704 Embedding ActiveX Controls in WPF Applications p. 710 Summary p. 714 User Controls and Custom Controls p. 717 Creating a User Control p. 719 Creating a Custom Control p. 728 Summary p. 746 Layout with Custom Panels p. 747 Communication Between Parents and Children p. 748 Creating a SimpleCanvas p. 751 Creating a SimpleStackPanel p. 756 Creating an OverlapPanel p. 759 Creating a FanCanvas p. 764 Summary p. 769 Toast Notifications p. 771 Prerequisites p. 771 Sending a Toast Notification p. 774 Toast Templates p. 775 Notification Events p. 778 Scheduled Notifications p. 779 Summary p. 780 Fun with XAML Readers and Writers p. 783 Overview p. 783 The Node Loop p. 786
Reading XAML p. 787 Writing to Live Objects p. 791 Writing to XML p. 793 XamlServices p. 794 Index p. 799 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.