I have a RadGridView and I've used the article located at: http://docs.telerik.com/devtools/wpf/controls/radgridview/style-selectors/rowstyleselector for styling the row Foreground color. Everything works great except the Alternate Rows have the same color as the "regular" (non-alternate) rows.
I use the "BasedOn" attribute of the style to use the loaded theme (expression_dark) and I thought I would create a second style just for the alternate rows.
Here is the style code:
<Grid.Resources> <my:WorkListStyle x:Key="WorkListStyle"> <my:WorkListStyle.ViewItem> <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}"> <Setter Property="Foreground" Value="Yellow" /> </Style> </my:WorkListStyle.ViewItem> </my:WorkListStyle> <my:WorkListAltStyle x:Key="WorkListAltStyle"> <my:WorkListAltStyle.ViewItem> <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewAlternateRowStyle}"> <Setter Property="Foreground" Value="Yellow" /> </Style> </my:WorkListAltStyle.ViewItem> </my:WorkListAltStyle></Grid.Resources>Then, in the RadGridView, I set these two options:
RowStyleSelector="{StaticResource WorkListStyle}"AlternateRowStyleSelector="{StaticResource WorkListAltStyle}"However, I get a run-time error when the xaml is parse on the "GridViewAlternateRowStyle" in the BasedOn attribute. Is there a different StaticResource I should be using? Thank you.