Windows Presentation Foundation is Microsoft's latest tool for creating rich client applications in the .NET Framework. Professional WPF Programming: .NET Development with the Windows Presentation Foundation, from Wrox Press, offers experienced .NET developers a look at WPF, demonstrating how to use it, and the design tool Expression Blend, to incorporate audio, video and other rich media into the user interface.
Chapter 7, Custom Controls, introduces developers to the concept of composition, which allows a control to host other controls -- like a button that contains a TextBox -- and thus gives Windows Presentation Foundation much of its dynamic UI capabilities.
From there, the authors walk developers through the steps necessary for creating a custom control -- choosing the right base class, building the control in Visual Studio, using XAML to create data binding extensions, and setting reusable styles and settings for later use. There is also a short section on using templates to customize existing Windows Presentation Foundation controls.
MORE: Read Chapter 6, WPF and Special Effects
Excerpted from the Wrox book, Professional WPF Programming: .NET Development with the Windows Presentation Foundation (ISBN: 978-0-470-04180-2) by Chris Andrade, Shawn Livermore, Mike Meyers and Scott Van Vliet.
Copyright © 2007. Published by John Wiley and Sons Inc., and available at your favorite book seller. Reprinted with permission.