This is a migrated thread and some comments may be shown as answers.

How can I reuse the simple style that customizes a chart series through ItemStyle?

1 Answer 103 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Can asked on 03 Aug 2010, 05:46 PM

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.

        <Style x:Key="MyStyle" TargetType="{x:Type telerik:Bar}">  
            <Setter Property="Template" >  
                    <ControlTemplate TargetType="{x:Type telerik:Bar}">  
                                   Height="{TemplateBinding ActualHeight}"  
                                   Width="{TemplateBinding ActualWidth}"/>  

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?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 06 Aug 2010, 11:45 AM
Hello Can,

Please check the MVVM example on our demo site and tell me if you need additional help.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question