Share via


WPF DataBinding References & Tutorials

Windows Presentation Foundation has a completely redesigned system for binding data to the UI, and can use a variety of binding sources including CLI objects and XML.

WPF DataBinding is one of the most important aspects to WPF, so below is a collection of resources

By far the best resources and most detailed tutorials are supplied by Microsoft, obviously...

These links are selected for their content and contribution. These articles are more than just a blog entry, or code dump and a few paragraphs. They provide code snippets and a good amount of discussion around the concepts. Anyone can use the search tool, and trawl through the results, but this is a hand picked list, for the most worthy use of your time.

A Guided Tour of WPF Part 3 - Data binding by Josh Smith (2007)
This article discusses DependancyProperties, DataContext and briefly touches on the Binding class. It shows XAML binding, a Converter, and a MultiBinding.

WPF Data Binding Part 1 by Joel Ivory Johnson (2008)
An introduction to data binding with WPF, covering XAML binding declarations, Binding.Mode, UpdateSourceTrigger (when to update the binding), binding to objects, properties, collections and DataTables, ValueConverters and touching on one basic aspect of Validation.

WPF A Beginners Guide Part 5 of n by Sacha Barber (2008)
This part of Sacha's comprehensive WPF guide mostly covers DataBinding. It covers DataContext, Binding.Mode, UpdateSourceTrigger, binding to UI elements, consuming XML data with the XMLDataProvider, Collections with ItemsSource and ValueConverters. This article has a good detailed exploration of several methods of Validation, including an introduction to custom ValidationRules and IDataErrorInfo.

Moving Toward WPF Data Binding One Step at a Time by Josh Smith (2008)
Introducing the concepts with a demo project, showing manualy changing properties, code binding, and the two forms of XAML binding (being 'verbose' declarative binding and "markup extension" {curly bracketted} binding), the latter being most common, but both have their uses.

A LINQ Tutorial WPF Data Binding with LINQ to SQL by Hacker Chick (2009)
An introduction to converting "Linq to Sql" output back into rsponsive objects within ObservableCollections, and also shows how to implement INotifyPropertyChanged, and touches on DataTemplates.

WPF Tutorial Concept Binding by Abhishek Sur (2010)
An introduction to the basic concepts of binding, DataContext, XAML binding declarations, code-behind binding, commanding and multi-binding.

Step by Step WPF Data Binding with Comboboxes by Steve Aube (2011)
ComboBox binding can be especially confusing for the beginner. Steve makes a good attempt at breaking it down in this article.