Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone, can someone help me with wpf button
I want to remove the border and button glow effect.
my button has an image background, it changes when the mouse hover but the button glows.

here is the button code, I'm using visual studio 2010

<Button  Grid.Row="1" Height="214" HorizontalAlignment="Left" Margin="92,10,0,0" Name="Inv" VerticalAlignment="Top" Width="279" BorderBrush="{x:Null}" Foreground="{x:Null}" Click="Inv_Click" Grid.RowSpan="2" BorderThickness="0" ClickMode="Press" Focusable="False" >
                <Style TargetType="{x:Type Button}">
                    <Setter Property="Background">
                            <ImageBrush ImageSource="/ManaData;component/Images/Inv.png"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background">
                                    <ImageBrush ImageSource="/ManaData;component/Images/Inv2.png"/>

1 solution

you can simply override the default border brush to your own border brush

    <trigger property="IsMouseOver" value="true">
        <setter property="BorderBrush" value="{StaticResource ToYourBorder}"></setter>
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900