I want load all the predefined colors in my listBox. I am using same thing for fonts too, but I don’t know about the color. I mean, I don’t know how to enumerate all the known Colors.
foreach (FontFamily F in Fonts.SystemFontFamilies)
{
ListBoxItem l = new ListBoxItem();
l.Content = F.ToString();
l.FontFamily = F;
listbox1.Items.Add(l);
}
How to do same thing for Color?
You could take color from KnownColor
Here is an example for Retrieving Colors.