Move PaletteBrushes to Style Resource

2 posts, 1 answers
  1. Lukas
    Lukas avatar
    42 posts
    Member since:
    Feb 2009

    Posted 30 Nov 2010 Link to this post


    in my app there are multiple charts and I want all of them to have the same PaletteBrushes.

    I tried to move the Brush-Collection to a resource in my App.xaml but could not find out how:

    Something like this:
    <Style x:Name="ChartStyle" x:Key="ChartStyle" TargetType="Controls:RadChart">

    But this throws exception:
    "Attachable property PalleteBrushes not found in type 'RadChart' "

    Is there a way to do this?

  2. Answer
    Yavor avatar
    11 posts

    Posted 03 Dec 2010 Link to this post

    Hello Lukas,

    At present, the PaletteBrushes property is read only so the collection can only be populated in xaml this way:

           <Color x:Key="Color1">#989898</Color>
      <telerikChart:RadChart VerticalAlignment="Top" x:Name="Chart1">
               <SolidColorBrush Color="{StaticResource Color1}">                

    Where the color resources are shared for all the chart instances in the project.
    I hope this information helps. If any other questions arise, do let me know.

    Kind regards,
    the Telerik team

    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top