Skip to content

Commit

Permalink
add theme resources (microsoft/microsoft-ui-xaml#2760)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Dec 3, 2020
1 parent 5d2b4b4 commit 50dc4e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ModernWpf.Controls/NavigationView/NavigationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@
Placement="BottomEdgeAlignedRight">
<local:Flyout.FlyoutPresenterStyle>
<Style TargetType="local:FlyoutPresenter">
<Setter Property="Padding" Value="0,8" />
<Setter Property="Padding" Value="{DynamicResource TopNavigationViewOverflowMenuPadding}" />
<!-- Set negative top margin to make the flyout align exactly with the button -->
<!--<Setter Property="Margin" Value="0,-4,0,0" />-->
</Style>
Expand Down Expand Up @@ -1473,7 +1473,7 @@
Placement="RightEdgeAlignedTop">
<local:Flyout.FlyoutPresenterStyle>
<Style TargetType="local:FlyoutPresenter">
<Setter Property="Padding" Value="0,8" />
<Setter Property="Padding" Value="{DynamicResource TopNavigationViewOverflowMenuPadding}" />
<!-- Set negative top margin to make the flyout align exactly with the button -->
<!--<Setter Property="Margin" Value="0,-4,0,0" />-->
</Style>
Expand Down
5 changes: 5 additions & 0 deletions ModernWpf/Styles/NavigationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@
<Thickness x:Key="TopNavigationViewItemOnOverflowExpandChevronMargin">-4,0,6,0</Thickness>
<Thickness x:Key="TopNavigationViewItemOnOverflowExpandChevronPadding">12,0,12,0</Thickness>

<!-- The two resources below must be defined at the app level in order to take effect. -->
<Thickness x:Key="TopNavigationViewOverflowMenuPadding">0,8</Thickness>
<Thickness x:Key="NavigationViewItemChildrenMenuFlyoutPadding">0,8</Thickness>

<!-- The resource below must be defined at the app level in order to affect the expand/collapse chevron font size
used in the Top NavigationView's Overflow menu. -->
<sys:Double x:Key="NavigationViewItemExpandedGlyphFontSize">12.0</sys:Double>
<sys:String x:Key="NavigationViewItemExpandedGlyph">&#xE70D;</sys:String>
<StreamGeometry x:Key="NavigationViewItemExpandedPath">M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z</StreamGeometry>

Expand Down

0 comments on commit 50dc4e4

Please sign in to comment.