------------------------------
public partial class UserControl1 : UserControl
{
[DefaultValue(typeof(string), "Init 标签"), Category("属性标签"), Description("设置文本的标签.")]
public string SealLabelText
{
get
{
return label1.Text;
}
set
{
label1.Text = value;
this.Invalidate();
}
}
[DefaultValue(typeof(string), "文本内容"), Category("内容字段"), Description("设置值.")]
public string SealTextContent
{
get
{
return textBox1.Text;
}
set
{
textBox1.Text = value;
this.Invalidate();
}
}
}
-------------------公布公共的属性-------------------- 复合控件