Hiding VS designer automatic defaulted properties

Visual Studio Forms Designer automatically attempts to set properties of controls added to the form at design time. Sometimes these automatic changes can cause problems. To tell the designer to not add the property references, mark your properties like this.

1
2
3
4
5
6
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string MyProperty
{
    get { return this.myproperty; }
    set { this.myproperty = value; }
}
//