Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AppBarButton and related classes to winui3/release/1.6.4 #19368

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,68 +1,56 @@
<!-- 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:local="using:Microsoft.UI.Xaml.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="DividerStrokeColorDefaultBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="DividerStrokeColorDefaultBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<Thickness x:Key="AppBarSeparatorMargin">2,8,2,8</Thickness>
<Thickness x:Key="AppBarOverflowSeparatorMargin">0,4,0,4</Thickness>
<x:Double x:Key="AppBarSeparatorWidth">1</x:Double>
<x:Double x:Key="AppBarOverflowSeparatorHeight">1</x:Double>
<x:Double x:Key="AppBarSeparatorCornerRadius">0.5</x:Double>

<Style TargetType="local:AppBarSeparator" BasedOn="{StaticResource DefaultAppBarSeparatorStyle}"/>

<Style x:Key="DefaultAppBarSeparatorStyle" TargetType="local:AppBarSeparator">
<Setter Property="Foreground" Value="{ThemeResource AppBarSeparatorForeground}" />
<Setter Property="Padding" Value="{ThemeResource AppBarSeparatorMargin}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:AppBarSeparator">
<Grid x:Name="RootGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ApplicationViewStates">
<!-- FullSize is used when we are in landscape or filled mode -->
<VisualState x:Name="FullSize"/>
<!-- Compact is used when we are in portrait or snapped mode -->
<VisualState x:Name="Compact">
<VisualState.Setters>
<Setter Target="RootGrid.Height" Value="{ThemeResource AppBarThemeCompactHeight}"/>
<Setter Target="RootGrid.VerticalAlignment" Value="Top"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Overflow">
<VisualState.Setters>
<Setter Target="SeparatorRectangle.Width" Value="NaN"/>
<Setter Target="SeparatorRectangle.HorizontalAlignment" Value="Stretch"/>
<Setter Target="SeparatorRectangle.Height" Value="{StaticResource AppBarOverflowSeparatorHeight}"/>
<Setter Target="SeparatorRectangle.Margin" Value="{StaticResource AppBarOverflowSeparatorMargin}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>

<Rectangle x:Name="SeparatorRectangle"
RadiusX="{StaticResource AppBarSeparatorCornerRadius}"
RadiusY="{StaticResource AppBarSeparatorCornerRadius}"
Width="{StaticResource AppBarSeparatorWidth}"
VerticalAlignment="Stretch"
Fill="{TemplateBinding Foreground}"
Margin="{TemplateBinding Padding}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

</ResourceDictionary>
<!-- MUX Reference controls\dev\CommonStyles\AppBarToggleButton_themeresources.xaml, tag winui3/release/1.6.4 -->
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="DividerStrokeColorDefaultBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="DividerStrokeColorDefaultBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="AppBarSeparatorForeground" ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<Thickness x:Key="AppBarSeparatorMargin">2,8,2,8</Thickness>
<Thickness x:Key="AppBarOverflowSeparatorMargin">0,4,0,4</Thickness>
<x:Double x:Key="AppBarSeparatorWidth">1</x:Double>
<x:Double x:Key="AppBarOverflowSeparatorHeight">1</x:Double>
<x:Double x:Key="AppBarSeparatorCornerRadius">0.5</x:Double>
<Style TargetType="AppBarSeparator" BasedOn="{StaticResource DefaultAppBarSeparatorStyle}" />
<Style x:Key="DefaultAppBarSeparatorStyle" TargetType="AppBarSeparator">
<Setter Property="Foreground" Value="{ThemeResource AppBarSeparatorForeground}" />
<Setter Property="Padding" Value="{ThemeResource AppBarSeparatorMargin}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="AppBarSeparator">
<Grid x:Name="RootGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ApplicationViewStates">
<!-- FullSize is used when we are in landscape or filled mode -->
<VisualState x:Name="FullSize" />
<!-- Compact is used when we are in portrait or snapped mode -->
<VisualState x:Name="Compact">
<VisualState.Setters>
<Setter Target="RootGrid.Height" Value="{ThemeResource AppBarThemeCompactHeight}" />
<Setter Target="RootGrid.VerticalAlignment" Value="Top" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Overflow">
<VisualState.Setters>
<Setter Target="SeparatorRectangle.Width" Value="NaN" />
<Setter Target="SeparatorRectangle.HorizontalAlignment" Value="Stretch" />
<Setter Target="SeparatorRectangle.Height" Value="{StaticResource AppBarOverflowSeparatorHeight}" />
<Setter Target="SeparatorRectangle.Margin" Value="{StaticResource AppBarOverflowSeparatorMargin}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="SeparatorRectangle" RadiusX="{StaticResource AppBarSeparatorCornerRadius}" RadiusY="{StaticResource AppBarSeparatorCornerRadius}" Width="{StaticResource AppBarSeparatorWidth}" VerticalAlignment="Stretch" Fill="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Loading
Loading