在设计模式属性窗口中显示内部控件的属性



我得到了一个UserControl名称UC1,其中包含2个控件(文本框,标签)。之后,我创建新的窗口窗体和拖动UC1到它,我怎么能读取和写入文本框和标签的所有属性(在UC1内)在"属性窗口"在设计模式?目前,我只能看到UC1的属性,但是文本框和标签的属性从来没有显示出来。请……谢谢. .

备注:不希望创建1 × 1的属性的控制,例如:公共覆盖属性blabla作为字符串…最终产权

in control.cs

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

public System.Windows.Forms.Label _lblCaption;

最新更新