Directory
Data Binding Details
Create a simple binding
Binding mode
Time of binding
Binding to XML
Object Bindings and DataTemplates
Sort the data
Welcome to trial and feedback
So far, many people know that using windows®presentation Foundation (WPF) makes it easy to design a powerful user interface. But you may not know that it also provides powerful data-binding capabilities. With WPF, you can manipulate data by using a combination of Microsoft®.net Framework code, XAML, or both. You can bind controls, public properties, XML, or objects to make data binding faster, more flexible, and simpler than before. So, let's take a look at how to start binding a control to your selected data source.
Data Binding Details
To use the WPF data binding feature, you must always have goals and sources. The target of a binding can be any accessible property or element derived from DependencyProperty, such as the Text property of a TextBox control. The source of the binding can be any public property, including other controls, common language runtime (CLR) objects, XAML elements, ado.net datasets, XML fragments, and so on. To help you implement bindings correctly, WPF contains two special providers: XmlDataProvider and ObjectDataProvider.
Now let's look at how WPF data-binding technology works, and I'll enumerate a few useful examples to illustrate their use.