Pages

Your Ad Here

Saturday, 18 September 2010

Data Template and Item Template



Data Template is used when different data is presented in the form of same data format.
This is defined under Resources of XAML page. While Declaring Data Template, make a complete set of required UI controls. like:
DataTemplate DataType="" Key=""
Control1
Control2
Control3
DataTemplate

ItemTemplate="{StaticResource RadialPartDescriptorTemplate}" BindingHandler:ValidationBindingHandler.ValidateItemsSource="True">

While using the DataTemplate, assign created DataTemplate in ItemTemplate and define ItemsSource also. ItemSource may have collection of type specified in DataTemplate.


DataTrigger::
In XAML file -
DataTemplate.Trigger

..................................

No comments: