locked
What is the default z-index for a listview control

    Question

  • I have a listview control and I am trying to find out if I don't set its z-index for the div that holds it, what the default is? I tried setting it to -1 and it makes the buttons non-responsive. I tried to find out using he below js and it doesn't return a number

    var e = document.getElementById('myListView');
    var value = e.style.zIndex;
    console.log("The z-index of your list control is: " + value);

    Thursday, December 12, 2013 2:48 PM

Answers

All replies

  • Hi Kyle, it would be the same as any other HTML element.  What is the underlying reason for your question?


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, December 13, 2013 12:48 PM
    Moderator
  • For our kiosk line of business app we have a idle animation that plays over the app when no one is using the app. The animation is designed to attract the user by having a animation that attracts the user to the kiosk. The issue is the animation plays below the list view control. When I set the z-index to -1 it plays above the list control (which is what I want) but then the list control is not as responsive to user interaction (which is not what I want :-( ). I have to talk to the people who designed the animation to let them know what range z-index to use. I just wanted to be sure I know what the default z-index is for the list view control so I tell them the right information.

    Friday, December 13, 2013 2:50 PM
  • When you say above you mean on top of right?

    z-index is not going to help you here.  What you should do is detect when there is any interaction on the animation and hide it when there is (tap etc....).  Make sense?


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, December 13, 2013 2:59 PM
    Moderator
  • so change the z-index when the animation is running. Then change it back when the idle animation is not?

    Friday, December 13, 2013 4:02 PM
  • Yup!  Your next problem is how to get it to go away when the user comes up to the Kiosk right?  You could hook up the tapped event so if they tap the animation or something else on the screen you could stop the animation and hide it (or z-index behind everything else)... I would vote on the former.

    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, December 13, 2013 4:22 PM
    Moderator