Windows Phone 7 Image Button

后端 未结 7 1818
抹茶落季
抹茶落季 2021-02-05 12:19

I need to create an Image Button for my application like web-oriented style. I have an image 20x20 pixel and want an image button with the same dimension of the image.

I

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 12:33

    This is old but I thought I would offer what I thought was a better solution here. Some of these solutions want you to replace the button with an image, or the background with an imagebrush. That's fine except it also surrounds the image with the normal button style, a black or white box (depending on your theme).

    This solution lets you use an image as the button itself while maintaining the complete fidelity of a button but without having to subclass an object like the link by SilverGeek.

    First, create a new style (either in your App.xaml or your page resources)