Bind ChartSeriesLabelDefinitions

2 posts, 1 answers
  1. Oleg
    Oleg avatar
    7 posts
    Member since:
    Jul 2012

    Posted 03 Dec 2013 Link to this post

    I have 5 barseries with the same label definitions.
    How can i reuse it?
    <telerikChart:BarSeries.LabelDefinitions>
      <telerikChart:ChartSeriesLabelDefinition VerticalAlignment="Center" HorizontalAlignment="Right">
              <telerikChart:ChartSeriesLabelDefinition.Template>
                 <DataTemplate>
                    <TextBlock Margin="12,0,0,0" Text="{Binding}"/>
                 </DataTemplate>
           </telerikChart:ChartSeriesLabelDefinition.Template>
       </telerikChart:ChartSeriesLabelDefinition>
    </telerikChart:BarSeries.LabelDefinitions>

    I tried to declare class - collection : List<LabelDefinition>
    but i can't bind it to BarSeries.LabelDefinitions because it says - read only
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 03 Dec 2013 Link to this post

    Hello, Oleg

    You can't reuse the whole LabelDefinition. You can only reuse the data template by putting it into the resources section and using it later as StaticResource.

    Please let us know if you need more help.

    Regards,
    Valentin.Stoychev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top