locked
Style irregular image button RRS feed

  • Question

  • hi all,

    my button has an irregular background image, a png file with alpha channel.

    of course, the irregularity is achieved through the alpha channel.

    what i want to do is when button hovered or pressed, a semi-transparent

    mask view with the exactly same shape as the background image is displayed just on top of the image.

    can i use xmal or code behind to define such a generic button style?

    thanks a lot.

    Monday, July 8, 2013 3:11 AM

Answers

  • You can create an image button which displays a transparent png with your mask in its PointerOver and PointerPressed states. This can be done in either xaml or code behind. I expect you can find existing 3rd party controls that implement it already.

    --Rob

    • Marked as answer by adewang1982 Tuesday, July 9, 2013 8:40 AM
    Tuesday, July 9, 2013 4:43 AM
    Moderator