37 lines
1017 B
C#
37 lines
1017 B
C#
using System.ComponentModel;
|
|
using System.Windows.Forms;
|
|
|
|
namespace JinYuan.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;
|
|
this.lbl_Title.Text = titleName;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|