Search code examples
c#windows-phone-8navigateuri

disable OnNavigatedTo when app resume


I wonder if its possible to disable the OnNavigatedTo event in windows phone application. Why I would like to do this is beacuse when I navigate in the app everything works as I want.

But when I go to the homescreen and back to the application when it resumes it does OnNavigatedTo and I only want that to be fired as long as you navigate between pages in the application.

Is this possible?


Solution

  • set a static Boolean flag as false, when u going out from the application (homescreen OnBackKeyPress) & set it as true when app starts(homescreen OnNavigatedTo).
    now check this flag on every OnNavigatedTo of pages wherever u need.