It’s quite a common scenario to have a page from which the user is navigated (login page or purchase page) but when the user leaves that page you don’t want them going back there via the back button.
You can handle this quite easily in code behind via the OnNavigatedTo override but in Caliburn Micro it gets even neater.
Firstly, in your bootstrapper class for Caliburn add the following to the root frame’s navigated handler. We are getting the navigation service from the DI container and if a particular querstring value was on the target page, we remove the source page from the back stack.
On your base view model (you do have one right?) add the following property.
Then lastly, when you want to navigate away from a page you don’t want the user to come back to, simply make sure BackNavSkipOne is true!
This is a nice transparent way to handle the back stack with Caliburn Micro.