-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better control of menu height (#2657)
* add menu assist class * change int to double + test * working property * restructuring demo
- Loading branch information
1 parent
70d2336
commit 2d06d3a
Showing
3 changed files
with
176 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace MaterialDesignThemes.Wpf | ||
{ | ||
public static class MenuAssist | ||
{ | ||
#region AttachedProperty : TopLevelMenuItemHeight | ||
public static readonly DependencyProperty TopLevelMenuItemHeightProperty | ||
= DependencyProperty.RegisterAttached( | ||
"TopLevelMenuItemHeight", | ||
typeof(double), | ||
typeof(MenuAssist)); | ||
|
||
public static double GetTopLevelMenuItemHeight(DependencyObject element) => (double)element.GetValue(TopLevelMenuItemHeightProperty); | ||
public static void SetTopLevelMenuItemHeight(DependencyObject element, double value) => element.SetValue(TopLevelMenuItemHeightProperty, value); | ||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters