How can I get the list of colors for the default palettes ?
1 Answer, 1 is accepted
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.