Data binding is a technique to establish a connection between the UI of the application and the business logic in order to have proper data synchronization between them. Though you can directly access UI controls from code behind to update their content, data binding has become the preferred way to update the UI layer for its automatic notification system.
To make data binding work in WPF applications, both sides of the binding must provide a change notification to the other side. The source property of a data binding can be a .NET CLR property or a dependency property, but the target property must be a dependency property, as shown here:
Data binding is typically done in XAML using the {Binding} markup extension. In this chapter, we are going to learn more about the WPF data binding mechanism by exploring a few recipes.