Skip to content

Commit

Permalink
Make chevrons visible for AppBarButtons in CommandBarFlyout in second…
Browse files Browse the repository at this point in the history
…ary commands menu (#5065)

* Update CommandBarFlyout styles so that the chevron shows up in the secondary commands menu when an item has a submenu.

* Adjustments.
  • Loading branch information
teaP authored May 21, 2021
1 parent a987a18 commit ec70e2c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FlyoutStates">
<VisualState x:Name="NoFlyout" />
<VisualState x:Name="HasFlyout">
<VisualState.Setters>
<Setter Target="SubItemChevron.Visibility" Value="{ThemeResource AppBarButtonHasFlyoutChevronVisibility}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>

<Border x:Name="AppBarButtonInnerBorder"
Expand Down Expand Up @@ -604,6 +612,9 @@
<VisualState x:Name="FullWidthOpenUp" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.Resources>
<Visibility x:Key="AppBarButtonHasFlyoutChevronVisibility">Visible</Visibility>
</Grid.Resources>
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Expand Down Expand Up @@ -640,6 +651,9 @@
<VisualState x:Name="FullWidthOpenUp" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.Resources>
<Visibility x:Key="AppBarButtonHasFlyoutChevronVisibility">Visible</Visibility>
</Grid.Resources>
<ScrollViewer
Margin="{TemplateBinding BorderThickness}"
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
Expand Down Expand Up @@ -757,6 +771,7 @@
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
contract7NotPresent:CornerRadius="{ThemeResource OverlayCornerRadius}">
<Grid.Resources>
<Visibility x:Key="AppBarButtonHasFlyoutChevronVisibility">Collapsed</Visibility>
<Style TargetType="AppBarButton" BasedOn="{StaticResource CommandBarFlyoutAppBarButtonStyle}" />
<Style TargetType="AppBarToggleButton" BasedOn="{StaticResource CommandBarFlyoutAppBarToggleButtonStyle}" />
<!-- We'll only provide opening and closing storyboards for RS5 and above,
Expand Down

0 comments on commit ec70e2c

Please sign in to comment.