0

I got a UserControl name UC1, which contain 2 controls (textbox, label). after that i create new windows form and drag the UC1 to it, how can i read and write ALL properties of textbox and label (inside UC1) in "Properties Windows" in design-mode? currently, i only can see UC1's properties, but properties of textbox and label never show out. please ... thanks..

REMARKS: No want create 1 by 1 of properties of control for example: Public Overrides Property blabla As String... End Property

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247
Aaron Loo
  • 1
  • 1

1 Answers1

1

in control.cs

[Description("Label displayed in the Control"), Category("Controls")]
    public Label lblCaption
    {
        get { return _lblCaption; }
        set { _lblCaption = value; }
    }

in control.Designer.cs

public System.Windows.Forms.Label _lblCaption;

do this for button

IM999MaxBonum
  • 171
  • 1
  • 5