RadChart ignores PaletteBrushes applied by style

2 posts, 0 answers
  1. Frank
    Frank avatar
    12 posts
    Member since:
    May 2011

    Posted 06 Jul 2012 Link to this post

    Dear support team,

    I'm using the RadChart and want to define a global style for several charts. One of the properties to be set is the property PaletteBrushes.

    As long as I apply the PaletteBrushes for the RadChart it works, but if I apply it by the style of the chart, the Brushes are not applied.

    This one is working:

    <telerik:BrushCollection x:Key="DashboardPaletteBrushes">
        <SolidColorBrush Color="Green" po:Freeze="True" />
        <SolidColorBrush Color="Yellow" po:Freeze="True" />
        <SolidColorBrush Color="Red" po:Freeze="True" />
    </telerik:BrushCollection>
      
    <telerik:RadChart PaletteBrushes="{StaticResource DashboardPaletteBrushes}" />

    This one does not work:

    <telerik:BrushCollection x:Key="DashboardPaletteBrushes">
        <SolidColorBrush Color="Green" po:Freeze="True" />
        <SolidColorBrush Color="Yellow" po:Freeze="True" />
        <SolidColorBrush Color="Red" po:Freeze="True" />
    </telerik:BrushCollection>
      
    <Style x:Key="DashboardChartStyle" TargetType="telerik:RadChart">
        <Setter Property="PaletteBrushes" Value="{StaticResource DashboardPaletteBrushes}" />
    </Style>
      
    <telerik:RadChart Style="{StaticResource DashboardChartStyle}" />

  2. Sia
    Admin
    Sia avatar
    667 posts

    Posted 11 Jul 2012 Link to this post

    Hello Frank,

    Currently setting palette brush collection through style is not supported. Please excuse us for the inconvenience caused.

    All the best,
    Sia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top