IMenuItem.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // ***********************************************************************
  2. // Assembly : HZH_Controls
  3. // Created : 08-15-2019
  4. //
  5. // ***********************************************************************
  6. // <copyright file="IMenuItem.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.Linq;
  19. using System.Text;
  20. namespace HZH_Controls.Controls
  21. {
  22. /// <summary>
  23. /// Interface IMenuItem
  24. /// </summary>
  25. public interface IMenuItem
  26. {
  27. /// <summary>
  28. /// Occurs when [selected item].
  29. /// </summary>
  30. event EventHandler SelectedItem;
  31. /// <summary>
  32. /// Gets or sets the data source.
  33. /// </summary>
  34. /// <value>The data source.</value>
  35. MenuItemEntity DataSource { get; set; }
  36. /// <summary>
  37. /// 设置样式
  38. /// </summary>
  39. /// <param name="styles">key:属性名称,value:属性值</param>
  40. void SetStyle(Dictionary<string, object> styles);
  41. /// <summary>
  42. /// 设置选中样式
  43. /// </summary>
  44. /// <param name="blnSelected">是否选中</param>
  45. void SetSelectedStyle(bool? blnSelected);
  46. }
  47. }