Reputation: 4208
is it possible to specify the color for the row selector in silverlight grid
Upvotes: 1
Views: 525
Reputation: 189457
Yes but you need to copy the control template for the DataGridRowHeader control and place it in a Style
object in a resource:-
<UserControl.Resources>
<Style x:Key="CustomRowHeader" TargetType="DataGridRowHeader">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="localprimitives:DataGridRowHeader">
<!-- Copy of the rest of the standard controls template -->
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<UserControl.Resources>
<DataGrid RowHeaderStyle="{StaticResouce CustomRowHeader}" ... >
Now you can fiddle around with the color value and pretty much anything else that is used to render the row selector.
You can probably do this with Blend fairly well if you have it and are familiar with using it. I prefer to copy the template from the documentation. See DataGrid Styles and Templates
Upvotes: 1
Reputation: 19893
No, but it's perfectly possible to subdivide a grid into rows/columns and fill them with rectangles+background or something like that.
Upvotes: 0