is it possible to specify the color for the row selector in silverlight grid
A:
No, but it's perfectly possible to subdivide a grid into rows/columns and fill them with rectangles+background or something like that.
Maciek
2009-12-31 07:38:32
+1
A:
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
AnthonyWJones
2009-12-31 18:30:04