wmcroberts3
wmcroberts3

Reputation: 1

Possible mvvmcross anomaly in setup of WP Application_Launching

I think the latest version of Mvvmcross, 3.0.14, may have an anomaly in setting up the Application_Launching override of a WP phone application. Previous versions would add in:

RootFrame.Navigating += RootFrameOnNavigating;

With the implementation of RootFrameOnNavigating doing the magic of hooking into the mvx framework so that your App.Initialize and subsequent RegisterAppStart of a viewmodel would setup your first page. With this implementation missing, you start with the page defined in WMAppManifest.

To be complete, here is the previous implementation of RootFrameOnNavigating that I no longer see when setting up a new WP project with mvvmcross vis Nuget:

private void RootFrameOnNavigating(object sender, NavigatingCancelEventArgs args)
{
    args.Cancel = true;
    RootFrame.Navigating -= RootFrameOnNavigating;
    RootFrame.Dispatcher.BeginInvoke(() => {    Cirrious.CrossCore.Mvx.Resolve<Cirrious.MvvmCross.ViewModels.IMvxAppStart>().Start(); });

    }

Upvotes: 0

Views: 60

Answers (1)

Stuart
Stuart

Reputation: 66882

Nothing has changed in this area.

Previous versions would not add in that code.

Adding this code has always been the responsibility of the app developer - it's never been part of the nuget setup - see the todo list in the current nuget package %20Windows%20Phone%20UI.txt">https://github.com/MvvmCross/MvvmCross/blob/v3/nuspec/PhoneContent/%20Windows%20Phone%20UI.txt

Upvotes: 0

Related Questions