I have a Subclass of a BindingSource that just extends it a bit for our special needs, and I would like to support it for the VS2008 Designer.
I have three properties, that I would like to get designer support for, two of them should be set to other Control
s on the form, one should be set to a Type
.
Displaying them in den Designer as well as setting a default value of null was quite easy, but how do I manage to get VS to select availlable Controls (ideally of desired type only) and or Type
s ?
Here's the code for the properties so far, any hint is welcome, since I do not know anything over VS-Designer support.
public class BindingSourceEx
: BindingSource
{
[DisplayName("DataSourceType")]
[Description("Sets the type to bind to.")]
public Type DataSourceType
{
get;
set;
}
[DisplayName("BindingNavigator")]
[DefaultValue(null)]
[Description("Sets the BindingNavigatorQ1 to use.")]
public BindingNavigatorEx BindingNavigator
{
get;
set;
}
[DisplayName("DataGridView")]
[DefaultValue(null)]
[Description("Sets the DataGridViewQ1 to use.")]
public DataGridViewEx DataGridView
{
get;
set;
}
}