locked
How to design Snapview for a WinJS app?

    Question

  • Hi,

       I have a WinJS app with 4 pages. I have registered window.Resize event in the homepage and so in all other corresponding pages. The issue is the event in homepage is triggered when the app is snapped from one of the other 3 pages. I assume this is the global event and so the homepage is triggered whenever the app is snapped. So how to overcome this?

    Thanks in Advance.

    Tuesday, July 09, 2013 7:25 AM

Answers

  • Hi raja124,

    Thanks for posting!

    From your description,I have some thought to share with you.

    I think if you dont want to other page excute this resize function, after excuted resize function,you can remove this function.

    You can try this method:

    window.addEventListener("resize", handleResize);
    function handleResize(evt) {
    //your logic code
     window.removeEventListener("resize", handleResize);
    }

    Hope this helps!


    Wednesday, July 10, 2013 7:53 AM
    Moderator