Hi,
I hate writing a title for a thread because sometimes it's impossible to explain my question in short :)
Anyway I've found the below style from this article in KB. What I want to do is being able to reuse this style in more than one chart or more than one series by just changing the color. But although I've tried to make "TemplateBinding" to Background property of Bar class or to some other control part but I wasn't able to do it. I couldn't find the place (if I can) to specify the Background property.
As a summary what I want to do is to bind Fill property to some other property on a control and reuse this style. It should be easy! But not for me?
Does anyone have an idea?
Thanks
I hate writing a title for a thread because sometimes it's impossible to explain my question in short :)
Anyway I've found the below style from this article in KB. What I want to do is being able to reuse this style in more than one chart or more than one series by just changing the color. But although I've tried to make "TemplateBinding" to Background property of Bar class or to some other control part but I wasn't able to do it. I couldn't find the place (if I can) to specify the Background property.
<Window.Resources> |
<Style x:Key="MyStyle" TargetType="{x:Type telerik:Bar}"> |
<Setter Property="Template" > |
<Setter.Value> |
<ControlTemplate TargetType="{x:Type telerik:Bar}"> |
<Rectangle |
x:Name="PART_DefiningGeometry" |
Fill="Red" |
Stroke="Pink" |
StrokeThickness="3" |
Height="{TemplateBinding ActualHeight}" |
Width="{TemplateBinding ActualWidth}"/> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</Window.Resources> |
As a summary what I want to do is to bind Fill property to some other property on a control and reuse this style. It should be easy! But not for me?
Does anyone have an idea?
Thanks