While writing my latest metro styled app (I really hate that phrase), I found myself needing to do Navigation in a way which preserved the separation of concerns in your run-of-the-mill MVVM setup. I’ve seen plenty of different techniques for doing Navigation across the internet but none have had this “purity” that I’ve been searching for. I’ll explain:
One of the most novel techniques I saw in my searches was wrapping the Navigation Service and exposing it to the View Model. This had the neat side effect of making Navigation mockable. All is good, right? Well, not exactly. I think that wrapping Navigation seems to solve a problem which shouldn’t, and doesn’t have to exist. The View Model should have no concept of Navigation.