using System.ComponentModel; using System.Windows.Forms; namespace CompressorXN_ControlLib { public partial class Title : UserControl { public Title() { InitializeComponent(); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.Selectable, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); } private string titleName = "标题名称"; [Browsable(true)] [Category("自定义属性")] [Description("设置或显示导航按钮的文本内容")] public string TitleName { get { return titleName; } set { titleName = value; lbl_Title.Text = titleName; } } } }