Question

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.?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top