How to prevent the designer to create a value for a property in InitializeComponent ?

S

Sagaert Johan

How to prevent the designer to create a value for a property in
InitializeComponent ?

I do not want the designer to create an initialisation entry in the
InitializeComponent method.

Is there any attribute i can apply to my property in my custom control to
avoid the designer making the init code ?

J.
 
A

Aboulfazl Hadi

Hi
You can use DesignerSerializationVisibility Attribute ans set its value
to hidden :

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]


Best Regard,
A.Hadi
 

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