| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Design.PreviewWith>
- <Button />
- </Design.PreviewWith>
- <ControlTheme x:Key="{x:Type Button}" TargetType="Button">
- <Setter Property="Button.Template">
- <ControlTemplate TargetType="Button">
- <ContentPresenter
- Name="PART_ContentPresenter"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- CornerRadius="{TemplateBinding CornerRadius}"
- RecognizesAccessKey="True"
- TextElement.Foreground="{TemplateBinding Foreground}" />
- </ControlTemplate>
- </Setter>
- <Style Selector="^.hover:pointerover /template/ ContentPresenter#PART_ContentPresenter">
- <Style.Animations>
- <Animation IterationCount="1" Duration=".35">
- <KeyFrame>
- <Setter Property="Background">
- <SolidColorBrush Color="{StaticResource SecondaryBackgroundColor}" />
- </Setter>
- </KeyFrame>
- <KeyFrame Cue="1">
- <Setter Property="Background">
- <SolidColorBrush Color="{DynamicResource AccentColor}" />
- </Setter>
- </KeyFrame>
- </Animation>
- </Style.Animations>
- <Setter Property="Background" Value="{DynamicResource AccentColor}" />
- </Style>
- <Style Selector="^.altHover:pointerover /template/ ContentPresenter#PART_ContentPresenter">
- <Style.Animations>
- <Animation IterationCount="1" Duration=".35">
- <KeyFrame>
- <Setter Property="Background">
- <SolidColorBrush Color="{StaticResource SecondaryBackgroundColor}" />
- </Setter>
- </KeyFrame>
- <KeyFrame Cue="1">
- <Setter Property="Background">
- <SolidColorBrush Color="{StaticResource BackgroundHoverColor}" />
- </Setter>
- </KeyFrame>
- </Animation>
- </Style.Animations>
- <Setter Property="Background" Value="{StaticResource BackgroundHoverColor}" />
- </Style>
- <Style Selector="^.alphaHover:pointerover /template/ ContentPresenter#PART_ContentPresenter">
- <Style.Animations>
- <Animation IterationCount="1" Duration=".35">
- <KeyFrame>
- <Setter Property="Background">
- <SolidColorBrush Color="Transparent" />
- </Setter>
- </KeyFrame>
- <KeyFrame Cue="1">
- <Setter Property="Background">
- <SolidColorBrush Color="{StaticResource AltBackgroundHoverColor}" />
- </Setter>
- </KeyFrame>
- </Animation>
- </Style.Animations>
- <Setter Property="Background" Value="{StaticResource AltBackgroundHoverColor}" />
- </Style>
- <Style Selector="^.hover:pressed /template/ ContentPresenter#PART_ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SecondaryAccentColor}" />
- </Style>
- <Style Selector="^.alphaHover:pressed /template/ ContentPresenter#PART_ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SecondaryAccentColor}" />
- </Style>
- <Style Selector="^:disabled">
- <Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}" />
- </Style>
- </ControlTheme>
- </ResourceDictionary>
|