Buttons with images in WPF

2

I'm new to WPF and I'm trying to create a button, where the content of it will have only a background image and nothing else. It will have no border, background color or text, just a clickable image.

I tried to do it:

<Button>
    <StackPanel>
        <Image Source="images\icon_button_exit.png" />
    </StackPanel>
</Button>

But the result was not pleasant ...

I want something like this:

Andthenwhentheuserhoveredoverthebuttonorclicked,asimilareffectwouldhappen:

What is the best way to do this?

    
asked by anonymous 31.05.2018 / 14:56

1 answer

0

To accomplish this in WPF, you will need 2 images, one for the standard effect and one for the Mouse Over effect.

Here's a Stackoverflow link that might help resolve this issue:

link

    
31.05.2018 / 15:44