mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-22 16:08:00 +08:00
621 lines
53 KiB
Plaintext
621 lines
53 KiB
Plaintext
|
<Toolkit:XamlApplication
|
||
|
x:Class="PowerRenameUILib.App"
|
||
|
xmlns:Toolkit="using:Microsoft.Toolkit.Win32.UI.XamlHost"
|
||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
|
||
|
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)"
|
||
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||
|
xmlns:contract6Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,6)"
|
||
|
xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
|
||
|
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives"
|
||
|
xmlns:local="using:PowerRenameUILib">
|
||
|
<Application.Resources>
|
||
|
<ResourceDictionary>
|
||
|
<ResourceDictionary.MergedDictionaries>
|
||
|
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||
|
<!-- Other merged dictionaries here -->
|
||
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
||
|
<Style x:Key="CustomToggleButtonStyle"
|
||
|
TargetType="ToggleButton">
|
||
|
<Setter Property="Background"
|
||
|
Value="{ThemeResource ToggleButtonBackground}" />
|
||
|
<Setter Property="BackgroundSizing"
|
||
|
Value="InnerBorderEdge" />
|
||
|
<Setter Property="Foreground"
|
||
|
Value="{ThemeResource ToggleButtonForeground}" />
|
||
|
<Setter Property="BorderBrush"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrush}" />
|
||
|
<Setter Property="BorderThickness"
|
||
|
Value="{ThemeResource ToggleButtonBorderThemeThickness}" />
|
||
|
<Setter Property="Padding"
|
||
|
Value="{StaticResource ButtonPadding}" />
|
||
|
<Setter Property="HorizontalAlignment"
|
||
|
Value="Left" />
|
||
|
<Setter Property="VerticalAlignment"
|
||
|
Value="Center" />
|
||
|
<Setter Property="FontFamily"
|
||
|
Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||
|
<Setter Property="FontWeight"
|
||
|
Value="Normal" />
|
||
|
<Setter Property="FontSize"
|
||
|
Value="{ThemeResource ControlContentThemeFontSize}" />
|
||
|
<Setter Property="UseSystemFocusVisuals"
|
||
|
Value="{StaticResource UseSystemFocusVisuals}" />
|
||
|
<Setter Property="FocusVisualMargin"
|
||
|
Value="-3" />
|
||
|
<Setter Property="CornerRadius"
|
||
|
Value="{ThemeResource ControlCornerRadius}" />
|
||
|
<Setter Property="Template">
|
||
|
<Setter.Value>
|
||
|
<ControlTemplate TargetType="ToggleButton">
|
||
|
<ContentPresenter x:Name="ContentPresenter"
|
||
|
Background="{TemplateBinding Background}"
|
||
|
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||
|
BorderThickness="1"
|
||
|
Content="{TemplateBinding Content}"
|
||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||
|
|
||
|
Padding="{TemplateBinding Padding}"
|
||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||
|
AutomationProperties.AccessibilityView="Raw">
|
||
|
|
||
|
<ContentPresenter.BackgroundTransition>
|
||
|
<BrushTransition Duration="0:0:0.083" />
|
||
|
</ContentPresenter.BackgroundTransition>
|
||
|
|
||
|
<VisualStateManager.VisualStateGroups>
|
||
|
<VisualStateGroup x:Name="CommonStates">
|
||
|
<VisualState x:Name="Normal" />
|
||
|
|
||
|
<VisualState x:Name="PointerOver">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Pressed">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Disabled">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Checked">
|
||
|
<Storyboard>
|
||
|
<!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundChecked}" />
|
||
|
</ObjectAnimationUsingKeyFrames>-->
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundChecked}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundChecked}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BackgroundSizing">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="CheckedPointerOver">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundCheckedPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushCheckedPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundCheckedPointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<contract7Present:ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BackgroundSizing">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
|
||
|
</contract7Present:ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="CheckedPressed">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundCheckedPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundCheckedPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushCheckedPressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BackgroundSizing">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="CheckedDisabled">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundCheckedDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundCheckedDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushCheckedDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Indeterminate">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundIndeterminate}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundIndeterminate}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushIndeterminate}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="IndeterminatePointerOver">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundIndeterminatePointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundIndeterminatePointerOver}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="IndeterminatePressed">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundIndeterminatePressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundIndeterminatePressed}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="IndeterminateDisabled">
|
||
|
<Storyboard>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Background">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBackgroundIndeterminateDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="Foreground">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonForegroundIndeterminateDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
||
|
Storyboard.TargetProperty="BorderBrush">
|
||
|
<DiscreteObjectKeyFrame KeyTime="0"
|
||
|
Value="{ThemeResource ToggleButtonBorderBrushIndeterminateDisabled}" />
|
||
|
</ObjectAnimationUsingKeyFrames>
|
||
|
</Storyboard>
|
||
|
</VisualState>
|
||
|
</VisualStateGroup>
|
||
|
</VisualStateManager.VisualStateGroups>
|
||
|
</ContentPresenter>
|
||
|
</ControlTemplate>
|
||
|
</Setter.Value>
|
||
|
</Setter>
|
||
|
</Style>
|
||
|
|
||
|
<Style x:Key="SplitAccentButtonStyle" TargetType="muxc:SplitButton">
|
||
|
<Setter Property="Background" Value="{ThemeResource AccentButtonBackground}" />
|
||
|
<Setter Property="Foreground" Value="{ThemeResource AccentButtonForeground}" />
|
||
|
<Setter Property="BorderBrush" Value="{ThemeResource AccentButtonBorderBrush}" />
|
||
|
<Setter Property="BorderThickness" Value="{ThemeResource SplitButtonBorderThemeThickness}" />
|
||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||
|
<Setter Property="FontWeight" Value="Normal" />
|
||
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||
|
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
||
|
<Setter Property="FocusVisualMargin" Value="-1" />
|
||
|
<Setter Property="IsTabStop" Value="True"/>
|
||
|
<Setter Property="Padding" Value="{ThemeResource ButtonPadding}"/>
|
||
|
<!--<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />-->
|
||
|
<Setter Property="Template">
|
||
|
<Setter.Value>
|
||
|
<ControlTemplate TargetType="muxc:SplitButton">
|
||
|
<Grid
|
||
|
x:Name="RootGrid"
|
||
|
Background="Transparent"
|
||
|
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
|
||
|
contract7NotPresent:CornerRadius="{ThemeResource ControlCornerRadius}">
|
||
|
|
||
|
<Grid.Resources>
|
||
|
<!-- Override the style of the inner buttons so that they don't affect background/foreground/border colors -->
|
||
|
<Style TargetType="Button">
|
||
|
<Setter Property="Foreground" Value="{ThemeResource AccentButtonForeground}" />
|
||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||
|
<Setter Property="BorderThickness" Value="{ThemeResource SplitButtonBorderThemeThickness}" />
|
||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||
|
<Setter Property="FontWeight" Value="Normal" />
|
||
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||
|
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||
|
<Setter Property="FocusVisualMargin" Value="-3" />
|
||
|
<Setter Property="Template">
|
||
|
<Setter.Value>
|
||
|
<ControlTemplate TargetType="Button">
|
||
|
<Grid x:Name="RootGrid" Background="Transparent">
|
||
|
|
||
|
<VisualStateManager.VisualStateGroups>
|
||
|
<VisualStateGroup x:Name="CommonStates">
|
||
|
<VisualState x:Name="Normal"/>
|
||
|
<VisualState x:Name="PointerOver">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Pressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
<VisualState x:Name="Disabled">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="ContentPresenter.Background" Value="{ThemeResource AccentButtonBackgroundDisabled}"/>
|
||
|
<Setter Target="ContentPresenter.BorderBrush" Value="{ThemeResource AccentButtonBorderBrushDisabled}"/>
|
||
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource AccentButtonForegroundDisabled}"/>
|
||
|
<Setter Target="ContentPresenter.Opacity" Value="0.6"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
</VisualStateGroup>
|
||
|
</VisualStateManager.VisualStateGroups>
|
||
|
|
||
|
<ContentPresenter x:Name="ContentPresenter"
|
||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||
|
Content="{TemplateBinding Content}"
|
||
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||
|
Padding="{TemplateBinding Padding}"
|
||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||
|
AutomationProperties.AccessibilityView="Raw"
|
||
|
muxc:AnimatedIcon.State="Normal"/>
|
||
|
</Grid>
|
||
|
</ControlTemplate>
|
||
|
</Setter.Value>
|
||
|
</Setter>
|
||
|
</Style>
|
||
|
</Grid.Resources>
|
||
|
|
||
|
<VisualStateManager.VisualStateGroups>
|
||
|
<VisualStateGroup x:Name="CommonStates">
|
||
|
<VisualState x:Name="Normal"/>
|
||
|
<VisualState x:Name="FlyoutOpen">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource AccentButtonBorderBrushPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="TouchPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource AccentButtonBorderBrushPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundSecondaryPressed}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="PrimaryPointerOver">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPointerOver}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPointerOver}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackground}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="PrimaryPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackground}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="SecondaryPointerOver">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackground}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPointerOver}"/>
|
||
|
<Setter Target="SecondaryButton.BorderBrush" Value="{ThemeResource AccentButtonBorderBrushPointerOver}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPointerOver}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="Transparent"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPointerOver}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="SecondaryPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackground}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="Checked">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushChecked}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedFlyoutOpen">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource AccentButtonBorderBrushPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedTouchPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushCheckedPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundCheckedPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundCheckedPressed}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedPrimaryPointerOver">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushChecked}"/>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPointerOver}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPointerOver}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedPrimaryPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushChecked}"/>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundCheckedPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundChecked}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedSecondaryPointerOver">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushChecked}"/>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource SplitButtonForegroundChecked}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundCheckedPointerOver}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPointerOver}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
|
||
|
<VisualState x:Name="CheckedSecondaryPressed">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="Border.BorderBrush" Value="{ThemeResource SplitButtonBorderBrushChecked}"/>
|
||
|
<Setter Target="PrimaryBackgroundGrid.Background" Value="{ThemeResource SplitButtonBackgroundChecked}"/>
|
||
|
<Setter Target="PrimaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="SecondaryBackgroundGrid.Background" Value="{ThemeResource AccentButtonBackgroundPressed}"/>
|
||
|
<Setter Target="SecondaryButton.Foreground" Value="{ThemeResource AccentButtonForegroundPressed}"/>
|
||
|
<Setter Target="DividerBackgroundGrid.Background" Value="{ThemeResource SplitButtonBorderBrushCheckedDivider}"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
</VisualStateGroup>
|
||
|
|
||
|
<VisualStateGroup x:Name="SecondaryButtonPlacementStates">
|
||
|
<VisualState x:Name="SecondaryButtonRight"/>
|
||
|
|
||
|
<VisualState x:Name="SecondaryButtonSpan">
|
||
|
<VisualState.Setters>
|
||
|
<Setter Target="SecondaryButton.(Grid.Column)" Value="0"/>
|
||
|
<Setter Target="SecondaryButton.(Grid.ColumnSpan)" Value="3"/>
|
||
|
</VisualState.Setters>
|
||
|
</VisualState>
|
||
|
</VisualStateGroup>
|
||
|
</VisualStateManager.VisualStateGroups>
|
||
|
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition x:Name="PrimaryButtonColumn" Width="*" MinWidth="{ThemeResource SplitButtonPrimaryButtonSize}"/>
|
||
|
<ColumnDefinition x:Name="Separator" Width="1" />
|
||
|
<ColumnDefinition x:Name="SecondaryButtonColumn" Width="{ThemeResource SplitButtonSecondaryButtonSize}"/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
|
||
|
<Grid x:Name="PrimaryBackgroundGrid"
|
||
|
Background="{TemplateBinding Background}"
|
||
|
Grid.ColumnSpan="2" />
|
||
|
|
||
|
<Grid x:Name="DividerBackgroundGrid"
|
||
|
Width="1"
|
||
|
Background="{ThemeResource AccentButtonBorderBrush}"
|
||
|
Grid.Column="1"/>
|
||
|
|
||
|
<Grid x:Name="SecondaryBackgroundGrid"
|
||
|
Background="{TemplateBinding Background}"
|
||
|
Grid.Column="2"/>
|
||
|
|
||
|
<Grid x:Name="Border"
|
||
|
Grid.ColumnSpan="3"
|
||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||
|
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"/>
|
||
|
|
||
|
<Button x:Name="PrimaryButton"
|
||
|
Grid.Column="0"
|
||
|
Foreground="{TemplateBinding Foreground}"
|
||
|
Background="{TemplateBinding Background}"
|
||
|
BorderThickness="0"
|
||
|
BorderBrush="Transparent"
|
||
|
Content="{TemplateBinding Content}"
|
||
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||
|
Command="{TemplateBinding Command}"
|
||
|
CommandParameter="{TemplateBinding CommandParameter}"
|
||
|
FontFamily="{TemplateBinding FontFamily}"
|
||
|
FontSize="{TemplateBinding FontSize}"
|
||
|
FontWeight="{TemplateBinding FontWeight}"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
VerticalAlignment="Stretch"
|
||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||
|
Padding="{TemplateBinding Padding}"
|
||
|
IsTabStop="False"
|
||
|
AutomationProperties.AccessibilityView="Raw"/>
|
||
|
|
||
|
<Button x:Name="SecondaryButton"
|
||
|
Grid.Column="2"
|
||
|
Foreground="{ThemeResource AccentButtonForeground}"
|
||
|
Background="{TemplateBinding Background}"
|
||
|
BorderThickness="0"
|
||
|
BorderBrush="Transparent"
|
||
|
HorizontalContentAlignment="Stretch"
|
||
|
VerticalContentAlignment="Stretch"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
VerticalAlignment="Stretch"
|
||
|
Padding="0,0,12,0"
|
||
|
IsTabStop="False"
|
||
|
AutomationProperties.AccessibilityView="Raw">
|
||
|
<Button.Content>
|
||
|
<muxc:AnimatedIcon Height="12" Width="12" VerticalAlignment="Center" HorizontalAlignment="Right" AutomationProperties.AccessibilityView="Raw">
|
||
|
<animatedVisuals:AnimatedChevronDownSmallVisualSource/>
|
||
|
<muxc:AnimatedIcon.FallbackIconSource>
|
||
|
<muxc:FontIconSource FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||
|
FontSize="8"
|
||
|
Glyph=""
|
||
|
IsTextScaleFactorEnabled="False"/>
|
||
|
</muxc:AnimatedIcon.FallbackIconSource>
|
||
|
</muxc:AnimatedIcon>
|
||
|
</Button.Content>
|
||
|
</Button>
|
||
|
</Grid>
|
||
|
</ControlTemplate>
|
||
|
</Setter.Value>
|
||
|
</Setter>
|
||
|
</Style>
|
||
|
|
||
|
</ResourceDictionary>
|
||
|
</Application.Resources>
|
||
|
</Toolkit:XamlApplication>
|