I'm new to WPF, and I'm simply experimenting with creating a gui to load a bunch of movie titles, and randomly select one. Currently, I'm working on getting my own custom close button to work. I want to replace the image with a different one, when the mouse hovers over it. However, when I do this, I get a blue square that comes up, instead of my image. Any idea why?
Also, how would I implement a new image to be shown when the button is clicked?
I have the following code:
<Button x:Name="xbutton" Height="34" Margin="765,0,0,0" VerticalAlignment="Top">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="images\ExNoHover.png"/>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="images/ExHover.png"/>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
Thanks