Synopses & Reviews
Windows Presentation Foundation (WPF) (formerly known by its code name "Avalon") is a brand-new presentation framework for Windows XP and Windows Vista, the next version of the Windows client operating system. For developers, WPF is a cornucopia of new technologies, including a new graphics engine that supports 3-D graphics, animation, and more; an XML-based markup language (XAML) for declaring the structure of your Windows UI; and a radical new model for controls.
Programming Windows Presentation Foundation, authored by Microsoft Software Legend Chris Sells and WPF guru Ian Griffiths, is the book you need to get up to speed on WPF. By page two, you'll have written your first WPF application, and by the end of Chapter 1, "Hello WPF," you'll have completed a rapid tour of the framework and its major elements. These include the XAML markup language and the mapping of XAML markup to WinFX code; the WPF content model; layout; controls, styles, and templates; graphics and animation; and, finally, deployment.
Programming Windows Presentation Foundation features:
- Scores of C# and XAML examples that show you what it takes to get a WPF application up and running, from a simple "Hello, Avalon" program to a tic-tac-toe game
- Insightful discussions of the powerful new programming styles that WPF brings to Windows development, especially its new model for controls
- A color insert to better illustrate WPF support for 3-D, color, and other graphics effects
- A tutorial on XAML, the new HTML-like markup language for declaring Windows UI
- An explanation and comparison of the features that support interoperability with Windows Forms and other Windows legacy applications
The next generation of Windows applications is going to blaze a trail into the unknown. WPF represents the best of the control-based Windows world and the content-based web world; it's an engine just itching to be taken for a spin. Inside, you'll find the keys to the ignition.
Updated samples and change notes for the move from the February CTP to Beta 2 are now available from the example site: http://www.sellsbrothers.com/writing/avbook/
About the Author
Chris Sells is a Program Manager for the Connected Systems Division. He's written several books, including Programming Avalon, Windows Forms Programming in C# and ATL Internals. In his free time, Chris hosts various conferences and makes a pest of himself on Microsoft internal product team discussion lists. More information about Chris, and his various projects, is available at http://www.sellsbrothers.com
Ian Griffiths is an independent consultant, developer, speaker, and author. He has written books on the Windows Presentation Foundation, Windows Forms, and Visual Studio. He lives in London but can often be found on various developer mailing lists and newsgroups, where a popular sport is to see who can get him to write the longest email in reply to the shortest possible question. More information about what Ian is up to can be found on his blog at http://www.interact-sw.co.uk/iangblog/
Table of Contents
Copyright; Preface; Who This Book Is For; How This Book Is Organized; What You Need to Use This Book; Conventions Used in This Book; Using Code Examples; Safari® Enabled; How to Contact Us; Ian's Acknowledgments; Chris's Acknowledgments; Chapter 1: Hello, WPF; 1.1 WPF from Scratch; 1.2 Navigation Applications; 1.3 Content Model; 1.4 Layout; 1.5 Controls; 1.6 Data Binding; 1.7 Dependency Properties; 1.8 Resources; 1.9 Styles and Control Templates; 1.10 Graphics; 1.11 Application Deployment; 1.12 Where Are We?; Chapter 2: Layout; 2.1 Layout Basics; 2.2 DockPanel; 2.3 StackPanel; 2.4 Grid; 2.5 Canvas; 2.6 Viewbox; 2.7 Text Layout; 2.8 Common Layout Properties; 2.9 When Content Doesn't Fit; 2.10 Custom Layout; 2.11 Where Are We?; Chapter 3: Controls; 3.1 What Are Controls?; 3.2 Handling Input; 3.3 Built-In Controls; 3.4 Where Are We?; Chapter 4: Data Binding; 4.1 Without Data Binding; 4.2 Data Binding; 4.3 Binding to List Data; 4.4 Data Sources; 4.5 Master-Detail Binding; 4.6 Where Are We?; Chapter 5: Styles and Control Templates; 5.1 Without Styles; 5.2 Inline Styles; 5.3 Named Styles; 5.4 Element-Typed Styles; 5.5 Data Templates and Styles; 5.6 Triggers; 5.7 Control Templates; 5.8 Where Are We?; Chapter 6: Resources; 6.1 Creating and Using Resources; 6.2 Resources and Styles; 6.3 Binary Resources; 6.4 Global Applications; 6.5 Where Are We?; Chapter 7: Graphics; 7.1 Graphics Fundamentals; 7.2 Shapes; 7.3 Brushes and Pens; 7.4 Transformations; 7.5 Visual-Layer Programming; 7.6 Video and 3-D; 7.7 Where Are We?; Chapter 8: Animation; 8.1 Animation Fundamentals; 8.2 Timelines; 8.3 Storyboards; 8.4 Key Frame Animations; 8.5 Creating Animations Procedurally; 8.6 Where Are We?; Chapter 9: Custom Controls; 9.1 Custom Control Basics; 9.2 Choosing a Base Class; 9.3 Custom Functionality; 9.4 Templates; 9.5 Default Visuals; 9.6 Where Are We?; Chapter 10: ClickOnce Deployment; 10.1 A Brief History of Windows Deployment; 10.2 ClickOnce: Local Install; 10.3 The Pieces of ClickOnce; 10.4 Publish Properties; 10.5 Deploying Updates; 10.6 ClickOnce: Express Applications; 10.7 Choosing Local Install versus Express; 10.8 Signing ClickOnce Applications; 10.9 Programming for ClickOnce; 10.10 Security Considerations; 10.11 Where Are We?; Appendix A: XAML; A.1 XAML Essentials; A.2 Properties; A.3 Markup Extensions; A.4 Code-Behind; A.5 Using Custom Types; A.6 Common Child-Content Patterns; A.7 Loading XAML; Appendix B: Interoperability; B.1 WPF and HWNDs; B.2 Hosting a Windows Form Control in WPF; B.3 Hosting a WPF Control in Windows Forms; B.4 Hosting WPF in Native HWND Apps; B.5 WPF and ActiveX Controls; B.6 WPF and HTML; Appendix C: Asynchronous and Multithreaded Programming in WPF Applications; C.1 The WPF Threading Model; C.2 The Dispatcher; C.3 BackgroundWorker; Color Plates; Colophon;