Adding code property to control property window

  • Thread starter Thread starter NuBBeR
  • Start date Start date
N

NuBBeR

I have created a boolean property in a custom control and i would like that
property to be visible in the control's property windows in the designer.
Does anyone know how to do this? Thanks in advace!
 
NuBBeR,

If the property is public, then it should show up. If you want it to
show up in a particular category, then you can add the Category attribute
from the System.ComponentModel namespace, and it will show up in the
particular category that you pass through the constructor of the attribute.
For example:

[Category("My Category")]
public bool MyProperty { ...

The MyProperty property will show up in a category named "My Category".
You can also specify other categories that already exist, and they will be
included in those.

Hope this helps.
 
Back
Top