Data Binding

Data Binding is a UI platform technology that allows properties of UI controls to be synchronized with properties of objects, which has been in many Microsoft technologies since early versions of Microsoft Access and Visual Basic. Newer platforms such as Windows Forms, Silverlight, and Windows Presentation Foundation have deep support for data binding, and in fact in WPF and Silverlight it can be close to impossible to build applications without using data binding.

Data Binding can generally work in two directions. UI controls can push changes to an object (such as when you type in a TextBox), or they can recieve change notifactions from the object (such as updating the value of a Progress Bar based on the property of an object).

Since native CLR objects have no way to signal that they have changed, to facilitate this propagation of change, objects can implement a number of interfaces. In WPF, Silverlight and Windows Forms, these are primarily INotifyPropertyChanged, IBindingList (Windows Forms and WPF) and INotifyCollectionChanged (WPF and Silverlight).

To work seemlessly with these UI technologies, Bindable LINQ queries implement these data binding interfaces so that UI controls can be connected and kept in-sync with Bindable LINQ queries automatically. This leverages the platform's support for data binding, while enabling reactive programming to take place far below the user interface.

Previous: LINQ
Copyright © Paul Stovell, 2007. All rights reserved.
Bindable LINQ code is licensed under the New BSD open source license.