[Navigation] Remove page from navigation stack


#1

Hi guys I am trying to remove a page from the navigation stack when the user chooses: “Do not show this page again” scenario. Lets describe the situation like:

  • I am currently in the page A. (Only page A in the stack)
  • I navigate to page B which there is a switch that lets the user not show the page B again. (Pages A and B in the stack)
  • I navigate to page C. (Pages A, B and C in the stack)

I want to be able to remove page B from navigation stack is the user chooses not show the page B again.

Any suggestions?

Thanks!


#2

Loop through the backStack in the frame, find your page and remove it form the array.