Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the border color of a flat button style

I'm trying to make a flat button with a red border instead of a black border when the button is pressed.

<Style TargetType="Button" x:Key="FlatButtonStyle">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Margin" Value="2" />
    <Setter Property="FontSize" Value="30" />
    <Style.Triggers>
        <Trigger Property="IsFocused" Value="true">
            <Setter Property="BorderBrush" Value="#E01919"/>
        </Trigger>
    </Style.Triggers>
</Style>

The problem is that there still is a black border, so now its showing both a red and black border.

How do i get rid of the black border ?

Thanks.

like image 391
user1005448 Avatar asked Sep 15 '25 01:09

user1005448


1 Answers

Stick this in your XAML BorderBrush="#000000" you can also grab a list of colours here

like image 159
Tom Avatar answered Sep 17 '25 18:09

Tom