locked
How get a page unloaded and make the AppBar in it disabled

    Question

  • hi!

    How  get  a page unloaded  and  make  the AppBar  in it  disabled

    Thursday, April 26, 2012 2:23 AM

All replies

  • In your Page.define you can add a method 'unload' that will get called whenever your app is being navigated away from the page (similar to the init/ready functions that you can use when your app is being navigated to the page).

    E.g.

    unload: function () {
                // Disable your app bar commands here...
            },


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, April 26, 2012 3:40 AM
  • In your Page.define you can add a method 'unload' that will get called whenever your app is being navigated away from the page (similar to the init/ready functions that you can use when your app is being navigated to the page).

    E.g.

    unload: function () {
                // Disable your app bar commands here...
            },


    This posting is provided "AS IS" with no warranties, and confers no rights.

    thanks  for you

    but ,   I  do  as  your suggest,the "unload"  method  not  have be called


    • Edited by BaiYi Thursday, April 26, 2012 5:29 AM
    Thursday, April 26, 2012 5:25 AM
  • Why do you need to disable the AppBar on that page if it is not visible?

    -Jeff


    Jeff Sanders (MSFT)

    Monday, May 14, 2012 7:00 PM
    Moderator