Silverlight 3 Released and Introduction to DataForm

Silverlight 3 has been officially released last Friday.  ScottGu's blog and have the details on the exciting new features and capabilities delivered in Silverlight 3.  Visit the Get Started page on to get all you need for developing in Silverlight 3.

One of the new features that I worked on in Silverlight 3 is the DataForm control.  Forms are widely used in many applications, and the Silverlight DataForm provides a powerful form out of the box that is easily customizable.  It provides a flexible way to display a single object of or collection of data in a form and to interact with the object(s).  It allows IEditableObject support, for the committing or cancelling of changes; it allows field- and entity-level validation through the consumption of attributes such as [Required]; and it allows navigation, should the form's binding be to a collection of data.

Here are some examples of using the DataForm:

Example 1: This is a basic DataForm with the default features out of the box.  It has its ItemsSource set to a List of entities which has validation.

        <dataformToolkit:DataForm ItemsSource="{StaticResource EmployeeList}" />

Example 2:  This shows 2 DataForms.  The DataForm on the left is the same one from Example 1.  The DataForm on the right is bound to the first DataForm by setting its CurrentItem using element name binding, and auto-generates its public properties so it works like a property grid.

        <dataformToolkit:DataForm ItemsSource="{StaticResource EmployeeList}" x:Name="dataForm1" />
        <dataformToolkit:DataForm CurrentItem="{Binding ElementName=dataForm1}" Grid.Column="1" />

Example 3:  This shows the many possibilities of using the DataForm control, such as Master-Details scenarios with the DataGrid, and usage with various other data sources and controls.

For more working examples, visit the Silverlight Toolkit Samples.

Hope this helps!