前提
入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章。
GitHub:https://github.com/kwwwvagaa/NetWinformControl
码云:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
如果觉得写的还行,请点个 star 支持一下吧
来都来了,点个【推荐】再走吧,谢谢
NuGet
Install-Package HZH_Controls
目录
https://www.cnblogs.com/bfyx/p/11364884.html
用处及效果
准备工作
没什么准备的,就是组装控件
开始
添加一个用户控件UCNavigationMenuOffice
添加属性
1 /// <summary> 2 /// The main menu height 3 /// </summary> 4 private int mainMenuHeight = 25; 5 6 /// <summary> 7 /// Gets or sets the height of the main menu. 8 /// </summary> 9 /// <value>The height of the main menu.</value> 10 [Description("主菜单高度,大于20的值"), Category("自定义")] 11 public int MainMenuHeight 12 { 13 get { return mainMenuHeight; }