Skip to content

Commit

Permalink
Add reveal style to Settings button in NavigationView in top mode,Closes
Browse files Browse the repository at this point in the history
 #942 (#1236)

* Add reveal style to Settings button in NavigationView in top mode,Closes #942

* Remove unnecessary contract check

* Add missing reveal state setters
  • Loading branch information
marcelwgn authored and jevansaks committed Sep 12, 2019
1 parent 3c4f001 commit 52f5bb1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions dev/NavigationView/NavigationView_rs1_themeresources.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -587,8 +587,7 @@
<Border
x:Name="RevealBorder"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
contract4NotPresent:Visibility="Collapsed" />
BorderThickness="{TemplateBinding BorderThickness}" />

<Grid HorizontalAlignment="Left"
x:Name="ContentGrid"
Expand Down Expand Up @@ -754,13 +753,15 @@
<Setter Target="LayoutRoot.Background" Value="{ThemeResource TopNavigationViewItemBackgroundPointerOver}" />
<Setter Target="PointerRectangle.Fill" Value="{ThemeResource NavigationViewItemBackgroundPointerOver}" />
<Setter Target="Icon.Foreground" Value="{ThemeResource TopNavigationViewItemForegroundPointerOver}" />
<contract4Present:Setter Target="LayoutRoot.(media:RevealBrush.State)" Value="PointerOver" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="LayoutRoot.Background" Value="{ThemeResource TopNavigationViewItemBackgroundPressed}" />
<Setter Target="PointerRectangle.Fill" Value="{ThemeResource NavigationViewItemBackgroundPressed}" />
<Setter Target="Icon.Foreground" Value="{ThemeResource TopNavigationViewItemForegroundPressed}" />
<contract4Present:Setter Target="LayoutRoot.(media:RevealBrush.State)" Value="Pressed" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Selected">
Expand All @@ -775,13 +776,15 @@
<Setter Target="LayoutRoot.Background" Value="{ThemeResource TopNavigationViewItemBackgroundPointerOver}" />
<Setter Target="PointerRectangle.Fill" Value="{ThemeResource NavigationViewItemBackgroundSelectedPointerOver}" />
<Setter Target="Icon.Foreground" Value="{ThemeResource TopNavigationViewItemForegroundPointerOver}" />
<contract4Present:Setter Target="LayoutRoot.(media:RevealBrush.State)" Value="PointerOver" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PressedSelected">
<VisualState.Setters>
<Setter Target="LayoutRoot.Background" Value="{ThemeResource TopNavigationViewItemBackgroundPressed}" />
<Setter Target="PointerRectangle.Fill" Value="{ThemeResource NavigationViewItemBackgroundSelectedPressed}" />
<Setter Target="Icon.Foreground" Value="{ThemeResource TopNavigationViewItemForegroundPressed}" />
<contract4Present:Setter Target="LayoutRoot.(media:RevealBrush.State)" Value="Pressed" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand All @@ -790,13 +793,19 @@
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="Icon.Foreground" Value="{ThemeResource TopNavigationViewItemForegroundDisabled}" />
<Setter Target="RevealBorder.BorderBrush" Value="{ThemeResource NavigationViewItemBorderBrushCheckedDisabled}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle
x:Name="PointerRectangle"
Fill="Transparent" />
<Border
x:Name="RevealBorder"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" >
</Border>
<Grid x:Name="ContentGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand Down

0 comments on commit 52f5bb1

Please sign in to comment.