var column1 = new GridTemplateColumn()
{
MappingName = "CustomerID",
CellTemplate = new DataTemplate(typeof(ButtonClass)) //where ButtonClass is the custom view derived from Button.
HeaderTemplate = new DataTemplate(typeof(HeaderTemplate)) //where HeaderTemplate is the custom view derived from Button.
}; |
var column1 = new GridTemplateColumn()
{
MappingName = "CustomerID",
CellTemplate = new DataTemplate(() =>
{
var button = new ButtonClass();
button.Clicked += Button_Clicked;
return button;
}),
HeaderTemplate = new DataTemplate(typeof(HeaderTemplate))
}; |