Visual Inheritance: Can I add custom properties to properties window?

M

Maxwell2006

Hi,

I created base UserControl for visual inheritance. The base control includes
the following property:

[Category("Appearance")]
[Description("The button text")]
[DefaultValue("Hi")]
public string ButtonText {
get {return this.button1.Text;}
set { this.button1.Text = value; }
}

But the property "ButtonText" does not appears in property window.

How can I add property window support to my Visual Inheritance procatice?

Thank you,
Max
 
M

Maxwell2006

Yep, Thank you!
Alex Bibiano González said:
I think you have to add [Browse(true)] before property

Maxwell2006 said:
Hi,

I created base UserControl for visual inheritance. The base control
includes the following property:

[Category("Appearance")]
[Description("The button text")]
[DefaultValue("Hi")]
public string ButtonText {
get {return this.button1.Text;}
set { this.button1.Text = value; }
}

But the property "ButtonText" does not appears in property window.

How can I add property window support to my Visual Inheritance procatice?

Thank you,
Max
 

Ask a Question

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.

Ask a Question

Top