Wednesday, December 16, 2009

New features in Silverlight 4 Beta: Navigation Page Loading Extensibility & Data Binding Changes

Today I’ll show two new Silverlight 4 features: custom navigation and data binding enhancements.

Navigation Page Loading Extensibility

Now you can extend the navigation system by setting a new ContentLoader property of the Frame class to a custom INavigationContentLoader implementation. The default ContentLoader property value is an instance of the PageResourceContentLoader class.


Useful links


Data binding changes

I have made two sample applications to demonstrate new data binding features.

Data Binding Sample One

  • Validation with IDataErrorInfo interface (ValidatesOnDataErrors)
  • String formatting, Null and Fallback values (StringFormat, TargetNull, FallbackValue)
  • Databinding support for dependency objects
  • Grouping on CollectionViewSource


Data Binding Sample Two

  • Synchronous and asynchronous validation with INotifyDataErrorInfo interface (ValidatesOnNotifyDataErrors)
  • Command property on ButtonBase and Hyperlink (in the sample: Button)
  • Binding to string indexers
  • SelectedValue and SelectedValuePath on the Selector (in the sample: ComboBox)


Other data binding  improvements

  • ObservableCollection<T> constructor that takes IEnumerable or IList
  • IEditableCollectionView (for example PagedCollectionView)

Useful links

No comments: