Problem solve Get help with specific problems with your technologies, process and projects.

Book excerpt: Windows Presentation Foundation and custom controls

This chapter walks developers through the process of creating custom Windows Presentation Foundation controls.

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.

Read the rest of the excerpt in this PDF.

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.

Dig Deeper on Windows Presentation Foundation

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.