You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. namespace BPA.UIControl
  9. {
  10. /// <summary>
  11. /// 汉堡包菜单选项
  12. /// </summary>
  13. public class HamburgerMenuOptionsItem : MenuItem
  14. {
  15. static HamburgerMenuOptionsItem()
  16. {
  17. DefaultStyleKeyProperty.OverrideMetadata(typeof(HamburgerMenuOptionsItem), new FrameworkPropertyMetadata(typeof(HamburgerMenuOptionsItem)));
  18. }
  19. #region properties
  20. ///// <summary>
  21. ///// 图标
  22. ///// </summary>
  23. //public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
  24. // "Icon", typeof(object), typeof(HamburgerMenuOptionsItem), new PropertyMetadata(null));
  25. ///// <summary>
  26. ///// 图标
  27. ///// </summary>
  28. //public object Icon
  29. //{
  30. // get { return (object)GetValue(IconProperty); }
  31. // set { SetValue(IconProperty, value); }
  32. //}
  33. /// <summary>
  34. /// 图标类型
  35. /// </summary>
  36. public static readonly DependencyProperty IconTypeProperty = DependencyProperty.Register(
  37. "IconType", typeof(IconType?), typeof(HamburgerMenuOptionsItem), new PropertyMetadata(null));
  38. /// <summary>
  39. /// 图标类型
  40. /// </summary>
  41. public IconType? IconType
  42. {
  43. get { return (IconType?)GetValue(IconTypeProperty); }
  44. set { SetValue(IconTypeProperty, value); }
  45. }
  46. #endregion properties
  47. }
  48. }