Properties - hiding, visual edition and grouping

  • Thread starter Thread starter Maciek
  • Start date Start date
M

Maciek

I'm creating UserControl and I've got 3 question about properties.

1. My class inherites from UserControl, so it's got for example
BackColor property - can I hide it (I don't want to see it in
Designer's properties window)?

2. How can I make my own visual editor for property - like one for
Image or Font?

3. Every property that I create are added into "Misc" group - can I
put it into other, for example "Appearance"?

Thx for help

Maciek
 
Hi,
1. My class inherites from UserControl, so it's got for example
BackColor property - can I hide it (I don't want to see it in
Designer's properties window)?

System.ComponentModel.BrowsableAttribute

[Browsable(false)]
public string MyProperty {...}
2. How can I make my own visual editor for property - like one for
Image or Font?

Search the MSDN Magazine archives...there were an excellent series of
articles just on this topic. Try searching the May 2003-Aug 2003 issues
first.
3. Every property that I create are added into "Misc" group - can I
put it into other, for example "Appearance"?

System.ComponentModel.CategoryAttribute

[Category("Appearance")]
public Color BackColor {...}
 
Back
Top