locked
Transparent button overlay for image bug? RRS feed

  • Question

  • I have an HTML5/JS app for win phone 8 for which I've built a custom listview for displaying individual games.  Each item in the list has a transparent button overlaying the item, which handles the tap event.  However, where there are images behind this transparent button, the tap event does not fire for the button.  You can tap anywhere but where the image is (left, right, above, and below), and the event does fire.  Below is a screenshot of the app with the list.

    This happens with all images in each individual list item.  To be certain of the button's positioning, I changed the css of the button (see below).

    As you can see, the buttons are sized properly.  I don't encounter this problem on any other platform (iOS, Android, Win 8 or running in a PC web browser).  Is this a bug with the browser control, or am I missing something?

    Wednesday, February 26, 2014 1:08 AM

Answers

  • In the interest of finding a resolution for you, can you set opacity to 1% rather than making it transparent?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, February 27, 2014 4:55 PM

All replies

  • If the button is not transparent, does it work?  I'm asking because I think that transparent items don't handle events in IE (web browser)

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, February 27, 2014 1:19 PM
  • When it is not transparent, you can click anywhere and it works.  When it is transparent, you can click anywhere but where an image is behind the transparent button.  IE desktop version works correctly.
    Thursday, February 27, 2014 4:09 PM
  • In the interest of finding a resolution for you, can you set opacity to 1% rather than making it transparent?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, February 27, 2014 4:55 PM
  • Thanks Matt.  That worked.  I set the opacity down to .01%.  It doesn't affect the appearance, and works as it should now.
    Friday, February 28, 2014 1:39 AM
  • I'm very pleased. :-)

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, February 28, 2014 2:52 PM