I have a custom control that when I drag onto the form, creates the following designer.cs code:
//
// colorPickerBackground
//
this.colorPickerBackground.Color = Color.Empty;
this.colorPickerBackground.Location = new System.Drawing.Point(256, 175);
this.colorPickerBackground.Name = "colorPickerBackground";
this.colorPickerBackground.Size = new System.Drawing.Size(156, 21);
this.colorPickerBackground.TabIndex = 17;
this.colorPickerBackground.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(this.colorPicke
I'd like it (Visual Studio) to completely ignore the .Color attribute and leave it be. How can I tell it to do that?
Thank you!
You can derive a new class from the ColorPickerBackground class. Override (or new) the Color property and decorate with the attributes found in System.ComponentModel...
Take a look at these:
http://msdn.microsoft.com/en-us/library/system.componentmodel.designerserializationvisibilityattribute.aspx
http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute.aspx
http://msdn.microsoft.com/en-us/library/system.componentmodel.editorbrowsableattribute.aspx