I started with the Telerik WPF Q2 2010 examples.
I went to Controls -> DATA -> GridView -> Appearance -> Custom Row Layout
I am using a slightly modified version of this now. What I want is to change the four gradient stops for the main row background dynamically based on object properties of the binding. The problem is that my template is 75 lines long and I think it seems very inefficient to duplicate this six times (for siz possible gradient values) and use a TemplateSelector. Instead I'd like to modify the border background property.
Here's a small snippet of code:
<ControlTemplate x:Key="TCCustomRowTemplate" TargetType="telerik:GridViewRow">
<Border x:Name="rowsContainer" Background="#FF525252" Padding="8,8,8,0" >
<Border x:Name="selectedRow" BorderThickness="1" BorderBrush="#FF000000"
Background="{StaticResource TC_INRowBackgroundSelected}>
How can I modify this background to be a different static resource dependant on my object?
I went to Controls -> DATA -> GridView -> Appearance -> Custom Row Layout
I am using a slightly modified version of this now. What I want is to change the four gradient stops for the main row background dynamically based on object properties of the binding. The problem is that my template is 75 lines long and I think it seems very inefficient to duplicate this six times (for siz possible gradient values) and use a TemplateSelector. Instead I'd like to modify the border background property.
Here's a small snippet of code:
<ControlTemplate x:Key="TCCustomRowTemplate" TargetType="telerik:GridViewRow">
<Border x:Name="rowsContainer" Background="#FF525252" Padding="8,8,8,0" >
<Border x:Name="selectedRow" BorderThickness="1" BorderBrush="#FF000000"
Background="{StaticResource TC_INRowBackgroundSelected}>
How can I modify this background to be a different static resource dependant on my object?