lets say that I have a global style set for ItemsContainer control, and this style is applied well during runtime. Now I have a requirement to paint Row background for each row, based on some condition. For this I decided to use RowStyleSelector.
<RadTreeListView RowStyleSelector="{StaticResource ActivityRowStyleSelector}" />
<Style x:Key="xxxTreeListViewStyle" TargetType="telerik:TreeListViewRow">
<Setter Property="Background" Value="#FFFFE1C4" />
</Style>
<local:xxxRowStyleSelector x:Key="xxxRowStyleSelector"
FailureStyle="{StaticResource xxxTreeListViewStyle}"
.../>
But this overrides the global style that I set for row, and I just want to change Background property to existing style.
And another question is: how would I apply this change to a particular cell, not row?
You can use the Style.BasedOn property to “inherit” one style from another. Use it like this (where
RowGlobalStyleis the name of the global style you’ve created previously):