You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
4.8 KiB
96 lines
4.8 KiB
1 year ago
|
<Styles xmlns="https://github.com/avaloniaui"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia">
|
||
|
<Design.PreviewWith>
|
||
|
<Border Padding="20">
|
||
|
<StackPanel>
|
||
|
<Button Classes="success" Content="Success Button" Margin="8" HorizontalAlignment="Center" />
|
||
|
<Button Classes="danger" Content="Danger Button" Margin="8" HorizontalAlignment="Center" />
|
||
|
<Button Classes="success" Content="Disabled Button" Margin="8" IsEnabled="False" />
|
||
|
</StackPanel>
|
||
|
</Border>
|
||
|
</Design.PreviewWith>
|
||
|
|
||
|
<!-- Success -->
|
||
|
<Style Selector="Button.success">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeGreenColor}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeGreenColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:pointerover">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeDarkGreenColor}"/>
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkGreenColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundPointerOver}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:pressed">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeDarkDarkGreenColor}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkDarkGreenColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:disabled">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
</Style>
|
||
|
|
||
|
<!-- Danger -->
|
||
|
<Style Selector="Button.danger">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeRedColor}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeRedColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:pointerover">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeDarkRedColor}"/>
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkRedColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundPointerOver}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:pressed">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ThemeDarkDarkRedColor}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkDarkRedColor}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
|
||
|
<Style Selector="^:disabled">
|
||
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
||
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
|
||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
|
||
|
</Style>
|
||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
|
||
|
</Style>
|
||
|
</Style>
|
||
|
</Style>
|
||
|
</Styles>
|