C#”+";签名窗口属性
本文关键字:窗口 属性 quot | 更新日期: 2023-09-27 18:27:33
我有类AppForm继承的Form,属性为AppIconForm(class)。我希望在设计时在属性窗口中的编辑IconForm属性上显示"+"号,并显示子属性(CloseIcon和MaximizedIcon)。谢谢!:)
public partial class AppForm : Form
{
AppIconForm iconform = new AppIconForm();
public AppForm()
{
InitializeComponent();
}
public AppIconForm IconForm
{
get { return iconform; }
set { iconform = value; }
}
}
//the code of AppIconForm class
public class AppIconForm
{
Icon closeicon;
Icon maximizeicon;
public Icon CloseIcon
{
get { return closeicon; }
set { closeicon = value; }
}
public Icon MaximizeIcon
{
get { return maximizeicon; }
set { maximizeicon = value; }
}
}
使用BrowsebleAttribute
[Browsable]
public Icon CloseIcon
{
get { return closeicon; }
set { closeicon = value; }
}