UserControls and Custom Controls with WPF
Summary
This Drill shows how to create reusable controls in Windows Presentation Foundation (WPF). Topics include user controls, dependency properties and routed events, named template parts and attached properties, and commands. It also demonstrates how to create a lookless custom control and to design a single-child element based on FrameworkElement.
Audience
This Drill is for developers who want to gain knowledge of important techniques for reusable controls in Windows Presentation Foundation (WPF).
What you'll learn
You’ll learn how to create a DependencyProperty and RoutedEvent in a UserControl, as well as how to create and use custom controls and lookless custom controls. You’ll also learn how to use attached properties and named template parts in a custom control, how to design a single-child element based on FrameworkElement, and how to use commands.
What you need to know
We assume that you’re already familiar with the concepts of programming and you’ve some experience of Visual Studio 2005. You’ll also need to be comfortable with Visual C# or Visual Basic syntax, and object-oriented development. A basic understanding of WPF concepts and XAML would also be desirable.
