Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Button mouseover event hides the button's background Image

$
0
0

hi,

I used an image for a button's background in WPF.

I also want the button to glow when mouse is over it. I used triggers to do this.

But when the mouse is over the button, the image is hidden and the button is filled with a blue box.

Pls tell me how to maintain the image even when the mouse is over the button.

<Button.Background><ImageBrush ImageSource="playbutton.jpg"></ImageBrush></Button.Background><Button.Style><Style><Style.Triggers><Trigger Property="Button.IsMouseOver" Value="True"><Setter Property="Button.Effect" Value="{StaticResource MyEffect}" /></Trigger></Style.Triggers></Style></Button.Style></Button><Window.Resources><DropShadowEffect x:Key="MyEffect" ShadowDepth="0" Color="Blue" Opacity="1" BlurRadius="20"/></Window.Resources>

Thanks,

Shaleen


TheHexLord


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>