Data binding
Data binding is one of the most important concepts in XAML, and it's the key to mastering many of the topics that we're going to discuss in the next chapters.
Thanks to data binding, you can create a communication channel between two different properties (either in code or in XAML) so that they get notified every time there's an update. This feature enables us to manage scenarios such as multiple controls that are connected to each other, or to create UIs that can automatically react to changes in a data layer. Data binding also enables us to define a clear separation between the UI layer and the data layer, and it's actually at the heart of the Model-View-ViewModel (MVVM) pattern, which we'll cover in Chapter 6, Building a Future-Proof Architecture.
Binding involves two actors – the source (which is the data layer) and the target (which is the UI control that will display the information). Let's consider the following example...