GK
Ganesan K
Syncfusion Team
November 4, 2009 12:45 PM UTC
Hi Hyla,
Thanks for using Syncfusion products.
We have an interface that lets you define the themed visual style for the GridDataControl. This would be exposed as a CustomVisualStyle property
You can create the custom theme by simply creating a class which implements the IGridDataVisualStyle
You can use the below properties for set HighlightSelectionBackground,HeaderBackground in IGridDataVisualStyle.
public Brush HighlightSelectionBackground
{
get
{
return Brushes.Aqua;
}
}
public Brush HeaderBackgroundBrush
{
get
{
return Brushes.Gray;
}
}
Then set the Created custom class to the GridDataControl using the property CustomVisualStyle as assigned in the below snippet.
this.dataGrid.CustomVisualStyle = new GridDataGlassyGreenStyle();
Finally set the VisualStyle as Custom,
this.dataGrid.VisualStyle = VisualStyle.Custom;
We have a sample for this feature in our Dashboard in the below location.
\WPF\Grid.WPF\Samples\3.5\WindowsSamples\Grid Data Control - Advanced\Custom Visual Style Demo
Please let us know if you need any more details.
Thanks
Ganesan