|
|
|
<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="info" Content="Info Button" Margin="8" HorizontalAlignment="Center" />
|
|
|
|
<Button 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>
|
|
|
|
|
|
|
|
<!-- Info -->
|
|
|
|
<Style Selector="Button.info">
|
|
|
|
<Style Selector="^ /template/ ui|FABorder#Root">
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ThemeLightBlueColor}" />
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeLightBlueColor}" />
|
|
|
|
</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 ThemeBlueColor}"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBlueColor}" />
|
|
|
|
</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 ThemeDarkBlueColor}" />
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkBlueColor}" />
|
|
|
|
</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>
|