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

Default Palettes Colors

1 Answer 114 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
azeddine
Top achievements
Rank 1
azeddine asked on 06 Sep 2012, 10:26 AM
How can I get the list of colors for the default palettes ?

1 Answer, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 10 Sep 2012, 01:39 PM
Hello Azeddine,

Thank you for contacting us.

Each predefined palette contains a GlobalEntries collection that holds eight PaletteEntry objects. Each PaletteEntry contains four properties that specify colors: Fill, Stroke, AdditionalFill, AdditionalStroke. That said, you can easily extract the Fill colors. Please note that currently each entry specifies a single color both its Fill and Stroke. Here is a sample snippet:
List<Color> Fills = new List<Color>();
foreach (PaletteEntry entry in KnownPalette.Arctic.GlobalEntries)
{
    Fills.Add(entry.Fill);
}

I hope this helps. Let me know if you have further queries.

Greetings,
Boryana
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ChartView
Asked by
azeddine
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or