Chapter 35
Advanced WPF
In the previous chapter you read about some of the core functionality of WPF. In this chapter programming with WPF continues. Here you read about some important aspects for creating complete applications such as data binding and command handling, and you also get an introduction to animations and 3-D programming.
The main topics of this chapter are:
- Data binding
- Commands
- Animations
- 3-D
- Windows Forms integration
Data Binding
In the previous chapter you saw a few features of data binding when styling the ListBox. But of course there is a lot more. WPF data binding takes another huge step forward compared to Windows Forms. This section gives you a good start in data binding with WPF and discusses these topics:
- Overview
- Binding with XAML
- Simple object binding
- Object data provider
- List binding
- Binding to XML
Overview
With WPF data binding, the target can be any dependency property of a WPF element, and every property of a CLR object can be the source. Because a WPF element is implemented as a .NET class, every WPF element can be the source as well. See Figure 35-1 for the connection between the source and the target. The Binding object defines the connection.
Binding supports several binding modes between the target and source. Binding can be one-way, where the source information goes to the target, but if the user changes information in the ...