this.sw1.AlignText = System.Drawing.ContentAlignment.MiddleCenter;
this.sw1.BackColor = System.Drawing.Color.Black;
this.sw1.BackOff = System.Drawing.Color.Black;
this.sw1.BackOn = System.Drawing.Color.Lime;
this.sw1.bIsOn = false;
this.sw1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.sw1.ForeColor = System.Drawing.Color.Lime;
this.sw1.ForeOff = System.Drawing.Color.Lime;
this.sw1.ForeOn = System.Drawing.Color.Black;
this.sw1.Location = new System.Drawing.Point(137, 81);
this.sw1.Name = "sw1";
this.sw1.Size = new System.Drawing.Size(20, 74);
this.sw1.TabIndex = 0;
Something has changed then because there is no initializer for the Text property. Now I did override the UserControl.Text property
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState.Always)]
[Description("Text label for this control.")]
public override string Text
{
get
{
return base.Text;
}
set
{
if (value != base.Text)
{
base.Text = value;
Invalidate();
}
}
}