NavigationMenuItemBase.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Text;
  7. namespace HZH_Controls.Controls
  8. {
  9. public class NavigationMenuItemBase
  10. {
  11. /// <summary>
  12. /// The icon
  13. /// </summary>
  14. private Image icon;
  15. /// <summary>
  16. /// Gets or sets the icon.
  17. /// </summary>
  18. /// <value>The icon.</value>
  19. [Description("图标,仅顶级节点有效")]
  20. public Image Icon
  21. {
  22. get { return icon; }
  23. set { icon = value; }
  24. }
  25. /// <summary>
  26. /// The text
  27. /// </summary>
  28. private string text;
  29. /// <summary>
  30. /// Gets or sets the text.
  31. /// </summary>
  32. /// <value>The text.</value>
  33. [Description("文本")]
  34. public string Text
  35. {
  36. get { return text; }
  37. set { text = value; }
  38. }
  39. /// <summary>
  40. /// The show tip
  41. /// </summary>
  42. private bool showTip;
  43. /// <summary>
  44. /// Gets or sets a value indicating whether [show tip].当TipText为空时只显示一个小圆点,否则显示TipText文字
  45. /// </summary>
  46. /// <value><c>true</c> if [show tip]; otherwise, <c>false</c>.</value>
  47. [Description("是否显示角标,仅顶级节点有效")]
  48. public bool ShowTip
  49. {
  50. get { return showTip; }
  51. set { showTip = value; }
  52. }
  53. /// <summary>
  54. /// The tip text
  55. /// </summary>
  56. private string tipText;
  57. /// <summary>
  58. /// Gets or sets the tip text
  59. /// </summary>
  60. /// <value>The tip text.</value>
  61. [Description("角标文字,仅顶级节点有效")]
  62. public string TipText
  63. {
  64. get { return tipText; }
  65. set { tipText = value; }
  66. }
  67. /// <summary>
  68. /// The anchor right
  69. /// </summary>
  70. private bool anchorRight;
  71. /// <summary>
  72. /// Gets or sets a value indicating whether [anchor right].
  73. /// </summary>
  74. /// <value><c>true</c> if [anchor right]; otherwise, <c>false</c>.</value>
  75. [Description("是否靠右对齐")]
  76. public bool AnchorRight
  77. {
  78. get { return anchorRight; }
  79. set { anchorRight = value; }
  80. }
  81. /// <summary>
  82. /// The item width
  83. /// </summary>
  84. private int itemWidth = 100;
  85. /// <summary>
  86. /// Gets or sets the width of the item.
  87. /// </summary>
  88. /// <value>The width of the item.</value>
  89. [Description("宽度")]
  90. public int ItemWidth
  91. {
  92. get { return itemWidth; }
  93. set { itemWidth = value; }
  94. }
  95. /// <summary>
  96. /// Gets or sets the data source.
  97. /// </summary>
  98. /// <value>The data source.</value>
  99. [Description("数据源")]
  100. public object DataSource { get; set; }
  101. }
  102. }