That makes sense if we're only talking about navigation initiated on the page that's dirty. Totally agree; the view model can handle button clicks (and enabled state) and make the call about when to issue a navigation event.
However, what I'm talking about is the user clicking somewhere else (e.g. some global navigation element backed by a different view model than the one with a dirty entity like moving to a different module, etc.). Assuming there's a NavigtionTrigger
there it's just going to raise a ViewNavigation event directly without consulting any view model. Are you saying in that case I wouldn't want to use a XAML Navigation Trigger but route ALL user navigation interactions through some kind of NavigationController
that finds the active view model (how can I do that btw?) and checks for a dirty flag?
I guess that could work as well if that's what you're suggesting but I may have misunderstood.
BTW, really appreciate all the work on Jounce!