I have a resource dictionary with the entry:
In one file. I reference this file from my App.xaml file like so:
Now in the file where I want to use the style, I have it referenced like this:
This, seemingly straight-forward solution produces no results as for every chart I have, the legend is visible. The only way to make this work was to use code-behind, but I'd like to not have to do that. Is this a Telerik bug (because I don't mind filing it) or some mistake on my part?
<
Style
x:Key
=
"legendStyle"
TargetType
=
"telerikCharting:ChartLegend"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerikCharting:ChartLegend"
>
<
Grid
Visibility
=
"Collapsed"
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
In one file. I reference this file from my App.xaml file like so:
<
Application.Resources
>
<
ResourceDictionary
>
<
ResourceDictionary.MergedDictionaries
>
<
ResourceDictionary
x:Name
=
"Ventana.Vantage.Silverlight.Res-Colors"
Source
=
"/Ventana.Vantage.Silverlight.Res;component/Styles/Colors.xaml"
/>
<
ResourceDictionary
x:Name
=
"PortletStyles"
Source
=
"Portlets/PortletStyles.xaml"
></
ResourceDictionary
>
</
ResourceDictionary.MergedDictionaries
>
</
ResourceDictionary
>
</
Application.Resources
>
Now in the file where I want to use the style, I have it referenced like this:
<
telerik:RadChart
x:Name
=
"chart"
ItemsSource
=
"{Binding Series.Cells}"
Grid.Row
=
"1"
Margin
=
"0 5 0 0"
BorderThickness
=
"0"
Style
=
"{StaticResource SmallFont}"
LegendStyle
=
"{StaticResource legendStyle}"
>
This, seemingly straight-forward solution produces no results as for every chart I have, the legend is visible. The only way to make this work was to use code-behind, but I'd like to not have to do that. Is this a Telerik bug (because I don't mind filing it) or some mistake on my part?