Confirm Navigation

Nov 21, 2013 at 10:00 AM
I was wondering... Is there a way to ConfirmNavigationRequest in the same way we could for WPF Prism?
Nov 21, 2013 at 4:35 PM

This version of Prism does not provide to confirm a navigation request before navigation like the WPF version does. However, in most cases this functionality is not required when creating a windows store app.

In the WPF version the "confirm navigation request" feature was specially useful when the navigation request was not invoked from the view itself. For example, when the user is editing a record and clicks a button in a menu outside the view. In this case the view was not the one to initiate the navigation so you would need a method that would allow the view to stop the navigation process, for example, to save the changes.

But with most windows store apps you have a single view at the time which fills the whole screen / window (a page,) so almost any interaction you have with the application when showing a page will be handled by the page itself and its view model, including invoking navigation requests to other pages. Therefore, if you are starting the navigation programatically in its view model, you can check the "state" first and if needed, prompt the user for confirmation before navigating (for example, by showing a popup.)


Damian Cherubini