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

How to bind the Font size and familiy of SeriesItemLabels

1 Answer 37 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Adam Petaccia
Top achievements
Rank 1
Adam Petaccia asked on 13 Aug 2010, 09:23 PM
I wish to bind the FontSize and FontFamily of the TextBlock of SeriesItemLabel to a DependencyObject in the code-behind portion of the code. Using styles, I can successfully do this to items like ChartItemLabel, but when I set the same items for SeriesItemLabel, I get binding errors stating how the element can not be found, yet the binding reads the same:

<Setter Property="FontFamily" Value="{Binding ElementName=MyDependencyObject, Path=Backend.LegendFontFamily}"/>

The help section on lists how to retemplate the control, but I don't wish a completely new look, I want to keep the default look; the user should simply be allowed to make it bigger/smaller.

 How should I create bindings for SeriesItemLabel?

1 Answer, 1 is accepted

Sort by
0
Adam Petaccia
Top achievements
Rank 1
answered on 17 Aug 2010, 07:57 PM
I've discovered that binding using AncestorType works, so I'm using that.
Tags
Chart
Asked by
Adam Petaccia
Top achievements
Rank 1
Answers by
Adam Petaccia
Top achievements
Rank 1
Share this question
or