Skip to content

Button hilite color #11200

@TKoodi

Description

@TKoodi

Window 11 fluent theme.

When trying to define custom hi-lite color for button in old way:

                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
                        <Setter Property="Background" Value="Red"/>
                        <Style.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" Value="Lime"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>

It's does not work. I also trying to set new styles:

              <Button.Resources>
                   <SolidColorBrush x:Key="ButtonPointerOverBackgroundBrush" Color="Red"/>
                   <SolidColorBrush x:Key="ButtonPressedBackgroundBrush" Color="DarkRed"/>
               </Button.Resources>

But it does not seems work neither.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions