Buttons with WPF images

Asked

Viewed 683 times

2

I’m new in WPF and I’m wanting to create a button, where its content will only have a background image and nothing else. Will not have border, background color or text, just a clickable image.

I tried to make:

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

But the result was not pleasant...

I want something like that:

inserir a descrição da imagem aqui

And then when the user would hover over the button or click, an effect similar to this would happen:

inserir a descrição da imagem aqui

What’s the best way to do that?

1 answer

0


  • 1

    This link may be a good suggestion, but your reply will not be valid if one day the link crashes. In addition, it is important for the community to have content right here on the site. It would be better to include more details in your response. A summary of the content of the link would be helpful enough! Learn more about it in this item of our Community FAQ: We want answers that contain only links?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.