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

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
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.
 
Hi
You can use DesignerSerializationVisibility Attribute ans set its value
to hidden :

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]


Best Regard,
A.Hadi
 
Back
Top