Silverlight 2 Knowledge Base

Data Binding is an important subject in Silverlight application development. It is powerful and allows developers to create cleaner code and be more productive. Framework such as Model-View-Viw Model (MVVM) also depends on data binding.

To get started, visit the tutorial on Silverlight.net. Jesse Liberty also has also a blog entry about data validation.

To get deeper, visit the Data Binding subject in MSDN. The following are some subjects to understand:

  • Data binding mode
    • OneTime bindings update the target with the source data when the binding is created.
    • OneWay bindings update the target with the source data when the binding is created and anytime the data changes. This is the default mode.
    • TwoWay bindings update both the target and the source when either changes.
  • Change nodification from source to target with IPropertyNotification
  • Bind to colleciton
  • Data Validation by setting both the ValidatesOnExceptions and NotifyOnValidationError properties to true on the binding object.
  • Custom data conversion with a converter class that implements the IValueConverter interface.

The following are some other resources:




(c) Li Chen 2008. ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.