Designer Attribute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

In my Windows Forms custom control, I have a property which is of type Form.
Hence, when the control is displayed in the Properties window of VS.NET, a
plus (+) button is shown next to that property's row, indicating it is
expandable. I don't want that to happen. Is there any Attribute class that I
can set on the property to disable the undesired behavior ?

Thanks in advance.

Dotnetjuny
 
Hi Dotnetjunky,

You can set [Browsable(false)] to that property and you won't see the
property in the browser.
 
Yes, I know this attribute. But I still want to display this property, just
not to let people expand the property and modify all the sub-properties of
it. Can this be done ?

Thanks for your reply.



Stoitcho Goutsev (100) said:
Hi Dotnetjunky,

You can set [Browsable(false)] to that property and you won't see the
property in the browser.

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Dotnetjunky said:
Hi,

In my Windows Forms custom control, I have a property which is of type
Form.
Hence, when the control is displayed in the Properties window of VS.NET, a
plus (+) button is shown next to that property's row, indicating it is
expandable. I don't want that to happen. Is there any Attribute class that
I
can set on the property to disable the undesired behavior ?

Thanks in advance.

Dotnetjuny
 
Back
Top