Search code examples
mvvmcross

Close view model (navigate back) in Init


I'm attempting to call Close(this) in Init in a ViewModel to navigate back, but I'm receiving the following from Mvvmcross in the debug output when running on Android.

mvx:Warning:  7.59 Ignoring close for viewmodel - rootframe's current page is not the view for the requested viewmodel

Is it possible to Close here?

Maybe I'm approaching this wrong. I want to open a connection based on a string I'm passing in Init and if it fails, show a toast (or equivalent notification) and go back.


Solution

  • No. Nor can you do it in Start.