NavigationMenuItem.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // ***********************************************************************
  2. // Assembly : HZH_Controls
  3. // Created : 2019-10-08
  4. //
  5. // ***********************************************************************
  6. // <copyright file="NavigationMenuItem.cs">
  7. // Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
  8. // </copyright>
  9. //
  10. // Blog: https://www.cnblogs.com/bfyx
  11. // GitHub:https://github.com/kwwwvagaa/NetWinformControl
  12. // gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
  13. //
  14. // If you use this code, please keep this note.
  15. // ***********************************************************************
  16. using System;
  17. using System.Collections.Generic;
  18. using System.ComponentModel;
  19. using System.Drawing;
  20. using System.Linq;
  21. using System.Text;
  22. namespace HZH_Controls.Controls
  23. {
  24. /// <summary>
  25. /// Class NavigationMenuItem.
  26. /// </summary>
  27. public class NavigationMenuItem : NavigationMenuItemBase
  28. {
  29. /// <summary>
  30. /// The items
  31. /// </summary>
  32. private NavigationMenuItem[] items;
  33. /// <summary>
  34. /// Gets or sets the items.
  35. /// </summary>
  36. /// <value>The items.</value>
  37. [Description("子项列表")]
  38. public NavigationMenuItem[] Items
  39. {
  40. get { return items; }
  41. set
  42. {
  43. items = value;
  44. if (value != null)
  45. {
  46. foreach (var item in value)
  47. {
  48. item.ParentItem = this;
  49. }
  50. }
  51. }
  52. }
  53. /// <summary>
  54. /// Gets or sets a value indicating whether this instance has split lint at top.
  55. /// </summary>
  56. /// <value><c>true</c> if this instance has split lint at top; otherwise, <c>false</c>.</value>
  57. [Description("是否在此项顶部显示一个分割线")]
  58. public bool HasSplitLintAtTop { get; set; }
  59. /// <summary>
  60. /// Gets the parent item.
  61. /// </summary>
  62. /// <value>The parent item.</value>
  63. [Description("父节点")]
  64. public NavigationMenuItem ParentItem { get; private set; }
  65. }
  66. }