Sunday, May 8, 2011

Using the Dataform control video tutorial

Just came across this video tutorial by mike taulty about Dataform which has been available in silverlight since V3 : http://www.silverlight.net/learn/videos/silverlight-videos/dataform-control/

There are a couple of things in this video that I really loved about the dataform.

  • Then there is the awesomeness of IEditableObject (I wish I knew about this interface sooner. Would have made dirty data handling so much easier : http://msdn.microsoft.com/en-us/library/system.componentmodel.ieditableobject(v=VS.95).aspx ). 
  • If you do not set the ItemsSource (and instead set CurrentItem) you can use it as a simply dirty object data handling form :) 
  • Setting AutoGenerateFields to false, and then setting the DataForm.Fields property to a collection of fields (e.g. DataFormCheckBoxField, DataFormComboBoxField, DataFormDateField etc) with a Binding for each field. Also cool are fields like DataFormHeader (+content property) , DataFormSeperator, DataFormFieldGroup. 
    • If you don't like these instead of Fields you can use the DisplayTemplate / EditTemplate which are standard DataTemplates 
Other points of note : 

No comments:

Post a Comment