views:

89

answers:

1

Okay basically here's where I'm at.

I have a list of PropertyDescriptor objects. These describe the custom "Options" fields on my Plugins, aka:

public class MyPlugin : PluginAbstract, IPlugin
{
 [PluginOption("This controls the color of blah blah blah")]
 [DefaultValue(Color.Red)]
 public Color TheColor { get; set; }

 [PluginOption("The number of blah blah blahs")]
 [DefaultValue(10)]
 public int BlahBlahBlahs { get; set; }
}

So I did all the hard parts: I have all the descriptions, default values, names and types of these custom "plugin options".

MY QUESTION IS: When a user loads a plugin, how should I represent these options for them to config? On the back end I'll be using XML for the config, so that's not what I'm asking. I'm asking on the front end: What kind of WinForms control should I use to let users configure the options of a plugin, when there will be an unknown amount of options and different types used etc.?

+2  A: 

I've always used the standard built-in Winforms PropertyGrid. It works well for different types of properties and for varying numbers as well.

Zach Johnson
This definitely looks promising. Thanks for responding.
Joshua
Thanks pretty much exactly what I was looking for. I'd vote you up by I need more rep haha
Joshua
While I think the PropertyGrid is the only out-of-the-box control thay will fit your needs, IMHO it's not a very user-friendly control. Any time I see an app that uses this control, I cringe. That said, you need to consider your audience.
bruceboughton