Restricting colors for a custom control?
am 02.04.2008 03:20:01 von JobLotI have a custom class with a public property of type color as follows. When I
bind an instance of ManagementIndicator to PropertyGrid control it displays
the public Indicator property with color drop down box.
public class ManagementIndicator
{
private Color _indicator;
public Color Indicator
{
get { return _indicator; }
set { _indicator = value; }
}
}
Now I want to restrict the drop down to show only three color (Red, Orange
and Green). How can I do that? I donât want it to show Custom, Web and System
tabs either. Is there anyway I can change the default behavior or is there
any color picker control available that I can use or do I have to create a
custom color drop down box?
Please help
Thanks