|
|
|
@ -1,36 +1,120 @@ |
|
|
|
<Styles xmlns="https://github.com/avaloniaui" |
|
|
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
x:CompileBindings="True" |
|
|
|
xmlns:converters="using:Avalonia.Controls.Converters"> |
|
|
|
<Design.PreviewWith> |
|
|
|
<Border Padding="60"> |
|
|
|
<StackPanel> |
|
|
|
<SplitButton Content="Hello World"> |
|
|
|
<StackPanel Spacing="20"> |
|
|
|
<SplitButton Content="SplitButton"> |
|
|
|
<SplitButton.Flyout> |
|
|
|
<Flyout>Hello</Flyout> |
|
|
|
</SplitButton.Flyout> |
|
|
|
</SplitButton> |
|
|
|
<ToggleSplitButton Content="Hello World"> |
|
|
|
<SplitButton CornerRadius="16" Content="Rounded"> |
|
|
|
<SplitButton.Flyout> |
|
|
|
<Flyout>Hello</Flyout> |
|
|
|
</SplitButton.Flyout> |
|
|
|
</SplitButton> |
|
|
|
<SplitButton IsEnabled="False">Disabled</SplitButton> |
|
|
|
<ToggleSplitButton Content="ToggleSplitButton"> |
|
|
|
<ToggleSplitButton.Flyout> |
|
|
|
<Flyout>Hello</Flyout> |
|
|
|
</ToggleSplitButton.Flyout> |
|
|
|
</ToggleSplitButton> |
|
|
|
<ToggleSplitButton Content="Checked" IsChecked="True"> |
|
|
|
<ToggleSplitButton.Flyout> |
|
|
|
<Flyout>Hello</Flyout> |
|
|
|
</ToggleSplitButton.Flyout> |
|
|
|
</ToggleSplitButton> |
|
|
|
<ToggleSplitButton Content="Checked Disabled" IsChecked="True" IsEnabled="False"/> |
|
|
|
</StackPanel> |
|
|
|
</Border> |
|
|
|
</Design.PreviewWith> |
|
|
|
|
|
|
|
<Styles.Resources> |
|
|
|
<x:Double x:Key="SplitButtonPrimaryButtonSize">32</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonSecondaryButtonSize">32</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonSeparatorWidth">1</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonMinHeight">32</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonPrimaryButtonSize">32</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonSecondaryButtonSize">32</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonSeparatorWidth">1</x:Double> |
|
|
|
<x:Double x:Key="SplitButtonMinHeight">32</x:Double> |
|
|
|
|
|
|
|
<converters:MarginMultiplierConverter x:Key="PrimaryButtonBorderMultiplier" Left="True" Top="True" Bottom="True" Indent="1" /> |
|
|
|
<converters:MarginMultiplierConverter x:Key="SecondaryButtonBorderMultiplier" Right="True" Top="True" Bottom="True" Indent="1" /> |
|
|
|
<converters:MarginMultiplierConverter x:Key="SeparatorBorderMultiplier" Top="True" Bottom="True" Indent="1" /> |
|
|
|
</Styles.Resources> |
|
|
|
<converters:MarginMultiplierConverter x:Key="PrimaryButtonBorderMultiplier" Left="True" Top="True" Bottom="True" Indent="1" /> |
|
|
|
<converters:MarginMultiplierConverter x:Key="SecondaryButtonBorderMultiplier" Right="True" Top="True" Bottom="True" Indent="1" /> |
|
|
|
<converters:MarginMultiplierConverter x:Key="SeparatorBorderMultiplier" Top="True" Bottom="True" Indent="1" /> |
|
|
|
|
|
|
|
<Style Selector="SplitButton"> |
|
|
|
<ControlTheme x:Key="FluentSplitButtonComponent" TargetType="Button"> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<ContentPresenter x:Name="PART_ContentPresenter" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
|
CornerRadius="{TemplateBinding CornerRadius}" |
|
|
|
Content="{TemplateBinding Content}" |
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
|
|
Padding="{TemplateBinding Padding}" |
|
|
|
RecognizesAccessKey="True" |
|
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" /> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter> |
|
|
|
|
|
|
|
<Style Selector="^:pointerover /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundPointerOver}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPointerOver}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPointerOver}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:pressed /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundPressed}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:disabled /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundDisabled}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushDisabled}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundDisabled}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^[Tag=flyout-open] /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundPressed}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^[Tag=checked]"> |
|
|
|
<Style Selector="^ /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundChecked}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushChecked}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundChecked}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:pointerover /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundCheckedPointerOver}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPointerOver}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPointerOver}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:pressed /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundCheckedPressed}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:disabled /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundCheckedDisabled}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedDisabled}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundCheckedDisabled}" /> |
|
|
|
</Style> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^[Tag=checked-flyout-open] /template/ ContentPresenter"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackgroundCheckedPressed}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
</ControlTheme> |
|
|
|
|
|
|
|
<ControlTheme x:Key="{x:Type SplitButton}" TargetType="SplitButton"> |
|
|
|
<Setter Property="Background" Value="{DynamicResource SplitButtonBackground}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForeground}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SplitButtonBorderBrush}" /> |
|
|
|
@ -40,211 +124,83 @@ |
|
|
|
<Setter Property="VerticalAlignment" Value="Center" /> |
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
|
|
<!--<Setter Property="UseSystemFocusVisuals" Value="True" /> |
|
|
|
<Setter Property="FocusVisualMargin" Value="-3" />--> |
|
|
|
<Setter Property="KeyboardNavigation.IsTabStop" Value="True" /> |
|
|
|
<Setter Property="Focusable" Value="True" /> |
|
|
|
<Setter Property="Padding" Value="{DynamicResource ButtonPadding}" /> |
|
|
|
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<Button x:Name="PART_PrimaryButton" |
|
|
|
Grid.Column="0" |
|
|
|
MinWidth="{DynamicResource SplitButtonPrimaryButtonSize}" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource PrimaryButtonBorderMultiplier}}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
Content="{TemplateBinding Content}" |
|
|
|
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}" |
|
|
|
Focusable="False" |
|
|
|
KeyboardNavigation.IsTabStop="False" /> |
|
|
|
|
|
|
|
<Border x:Name="SeparatorBorder" |
|
|
|
Grid.Column="1" |
|
|
|
Background="Transparent" |
|
|
|
Width="{DynamicResource SplitButtonSeparatorWidth}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SeparatorBorderMultiplier}}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" /> |
|
|
|
|
|
|
|
<Button x:Name="PART_SecondaryButton" |
|
|
|
Grid.Column="2" |
|
|
|
MinWidth="{DynamicResource SplitButtonSecondaryButtonSize}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SecondaryButtonBorderMultiplier}}" |
|
|
|
Padding="0" |
|
|
|
HorizontalContentAlignment="Center" |
|
|
|
VerticalContentAlignment="Center" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch" |
|
|
|
Focusable="False" |
|
|
|
KeyboardNavigation.IsTabStop="False" /> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Default overridable styles --> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_PrimaryButton"> |
|
|
|
<Setter Property="CornerRadius" Value="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_SecondaryButton"> |
|
|
|
<Setter Property="CornerRadius" Value="{TemplateBinding CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" /> |
|
|
|
<Setter Property="Content"> |
|
|
|
<Template> |
|
|
|
<PathIcon Height="12" |
|
|
|
Width="12" |
|
|
|
Data="M1939 486L2029 576L1024 1581L19 576L109 486L1024 1401L1939 486Z" /> |
|
|
|
</Template> |
|
|
|
<ControlTemplate> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<Button x:Name="PART_PrimaryButton" |
|
|
|
Grid.Column="0" |
|
|
|
Theme="{StaticResource FluentSplitButtonComponent}" |
|
|
|
MinWidth="{DynamicResource SplitButtonPrimaryButtonSize}" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource PrimaryButtonBorderMultiplier}}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
Content="{TemplateBinding Content}" |
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
|
|
Command="{TemplateBinding Command}" |
|
|
|
CommandParameter="{TemplateBinding CommandParameter}" |
|
|
|
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource LeftCornerRadiusFilterConverter}}" |
|
|
|
FontFamily="{TemplateBinding FontFamily}" |
|
|
|
FontSize="{TemplateBinding FontSize}" |
|
|
|
FontWeight="{TemplateBinding FontWeight}" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch" |
|
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
|
Padding="{TemplateBinding Padding}" |
|
|
|
Focusable="False" |
|
|
|
KeyboardNavigation.IsTabStop="False" /> |
|
|
|
|
|
|
|
<Border x:Name="SeparatorBorder" |
|
|
|
Grid.Column="1" |
|
|
|
Background="Transparent" |
|
|
|
Width="{DynamicResource SplitButtonSeparatorWidth}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SeparatorBorderMultiplier}}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" /> |
|
|
|
|
|
|
|
<Button x:Name="PART_SecondaryButton" |
|
|
|
Grid.Column="2" |
|
|
|
Theme="{StaticResource FluentSplitButtonComponent}" |
|
|
|
MinWidth="{DynamicResource SplitButtonSecondaryButtonSize}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SecondaryButtonBorderMultiplier}}" |
|
|
|
CornerRadius="{TemplateBinding CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" |
|
|
|
Padding="0" |
|
|
|
HorizontalContentAlignment="Center" |
|
|
|
VerticalContentAlignment="Center" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
VerticalAlignment="Stretch" |
|
|
|
Focusable="False" |
|
|
|
KeyboardNavigation.IsTabStop="False"> |
|
|
|
<PathIcon Height="12" Width="12" |
|
|
|
Data="M1939 486L2029 576L1024 1581L19 576L109 486L1024 1401L1939 486Z" /> |
|
|
|
</Button> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Primary and Secondary buttons PointerOver State --> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_PrimaryButton:pointerover /template/ ContentPresenter, |
|
|
|
SplitButton /template/ Button#PART_SecondaryButton:pointerover /template/ ContentPresenter"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundPointerOver}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPointerOver}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPointerOver}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_SecondaryButton:pointerover PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPointerOver}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Primary and Secondary buttons Pressed State --> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_PrimaryButton:pressed /template/ ContentPresenter, |
|
|
|
SplitButton /template/ Button#PART_SecondaryButton:pressed /template/ ContentPresenter"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton /template/ Button#PART_SecondaryButton:pressed PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- SplitButton Pressed State --> |
|
|
|
<Style Selector="SplitButton:pressed /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:pressed /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:pressed /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPressed}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:pressed /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Primary and Secondary buttons Flyout Open State --> |
|
|
|
<Style Selector="SplitButton:flyout-open /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:flyout-open /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:flyout-open /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushPressed}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:flyout-open /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Disabled State --> |
|
|
|
<Style Selector="SplitButton:disabled /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:disabled /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:disabled /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundDisabled}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushDisabled}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundDisabled}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:disabled /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundDisabled}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Checked State --> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundChecked}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushChecked}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundChecked}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundChecked}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Checked PointerOver State --> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_PrimaryButton:pointerover /template/ ContentPresenter, |
|
|
|
SplitButton:checked /template/ Button#PART_SecondaryButton:pointerover /template/ ContentPresenter"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundCheckedPointerOver}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPointerOver}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPointerOver}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_SecondaryButton:pointerover PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPointerOver}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Checked Pressed State --> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_PrimaryButton:pressed /template/ ContentPresenter, |
|
|
|
SplitButton:checked /template/ Button#PART_SecondaryButton:pressed /template/ ContentPresenter"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundCheckedPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPressed}" /> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:checked /template/ Button#PART_SecondaryButton:pressed PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- SplitButton Checked Pressed State --> |
|
|
|
<Style Selector="SplitButton:pressed:checked /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:pressed:checked /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:pressed:checked /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundCheckedPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPressed}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:pressed:checked /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Checked Flyout Open State --> |
|
|
|
<Style Selector="SplitButton:checked:flyout-open /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked:flyout-open /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked:flyout-open /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundCheckedPressed}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedPressed}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:checked:flyout-open /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedPressed}" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<!-- Disabled Checked State --> |
|
|
|
<Style Selector="SplitButton:checked:disabled /template/ Button#PART_PrimaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked:disabled /template/ Button#PART_SecondaryButton /template/ ContentPresenter, |
|
|
|
SplitButton:checked:disabled /template/ Border#SeparatorBorder"> |
|
|
|
<Setter Property="Border.Background" Value="{DynamicResource SplitButtonBackgroundCheckedDisabled}" /> |
|
|
|
<Setter Property="Border.BorderBrush" Value="{DynamicResource SplitButtonBorderBrushCheckedDisabled}" /> |
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SplitButtonForegroundCheckedDisabled}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="SplitButton:checked:disabled /template/ Button#PART_SecondaryButton PathIcon"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SplitButtonForegroundCheckedDisabled}" /> |
|
|
|
</Style> |
|
|
|
</Styles> |
|
|
|
|
|
|
|
<Style Selector="^:flyout-open /template/ Button"> |
|
|
|
<Setter Property="Tag" Value="flyout-open" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:checked /template/ Button"> |
|
|
|
<Setter Property="Tag" Value="checked" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^:checked:flyout-open /template/ Button"> |
|
|
|
<Setter Property="Tag" Value="checked-flyout-open" /> |
|
|
|
</Style> |
|
|
|
</ControlTheme> |
|
|
|
</ResourceDictionary> |
|
|
|
|