Text property in a UserControl in C#

前端 未结 3 1231
既然无缘
既然无缘 2020-11-30 05:46

I have a control with a inner TextBox. I want to make a direct relationship between the Text property of the UserControl and the Text property of the TextBox. The first thin

3条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 06:35

    You need more attributes:

    [EditorBrowsable(EditorBrowsableState.Always)]
    [Browsable(true)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
    [Bindable(true)]
    public override string Text { get; set; }
    

提交回复
热议问题