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.

28 line
764 B

  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace BPA.UIControl
  4. {
  5. /// <summary>
  6. /// 汉堡包菜单选项控件
  7. /// </summary>
  8. public class HamburgerMenuOptions : Menu
  9. {
  10. static HamburgerMenuOptions()
  11. {
  12. DefaultStyleKeyProperty.OverrideMetadata(typeof(HamburgerMenuOptions), new FrameworkPropertyMetadata(typeof(HamburgerMenuOptions)));
  13. }
  14. /// <inheritdoc/>
  15. protected override bool IsItemItsOwnContainerOverride(object item)
  16. {
  17. return item is HamburgerMenuOptionsItem;
  18. }
  19. /// <inheritdoc/>
  20. protected override DependencyObject GetContainerForItemOverride()
  21. {
  22. return new HamburgerMenuOptionsItem();
  23. }
  24. }
  25. }