WPF Data Binding Introduction


This entry is part 1 of 7 in the series WPF Data Binding

What is binding in WPF? It is about tying together .NET objects. It’s about fastening together. In the XAML context, we use binding to allow one GUI control to go over and get some data from another GUI control and then keep that data up to date. Wikipedia says: “data binding is a general technique that binds data sources from the provider and consumer together and synchronizes them.”

The System.Windows.Data.Binding object “glues” two properties together and keeps a channel of communication open between them. You just need to set up binding once and have it do all of the synchronization work for the rest of the app’s lifetime. In Adam Nathan’s book WPF 4.5 Unleashed by Sams in chapter 13 on page 361 he expresses data binding this way: “Hey, ListBox! Get your items from over here. And keep them up to date, please. Oh Yeah, and format them to look like this.”

Series NavigationWPF Data Binding in XAML >>