I am trying to create a property that takes a value from an enumerated type and is displayed in the properties window for a custom control. Any ideas how to go about this anyone?
What you need to do is to help the property grid out a bit
on the way. You do this by provinding a TypeConverter to the
property and tell it to use the EnumConverter.
[TypeConverter(typeof(EnumConverter))]
public MyEnum PropName
{
// add get/set code
}
There are a wide range of converters you can use and you can
also derive your own converter for complex types.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.