Beispiel #1
0
        protected virtual void RunAppStart(IActivatedEventArgs activationArgs)
        {
            var instance = MvxWindowsSetupSingleton.EnsureSingletonAvailable(RootFrame, ActivationArguments, nameof(Suspend));

            if (RootFrame.Content == null)
            {
                instance.EnsureInitialized();

                if (Mvx.IoCProvider.TryResolve(out IMvxAppStart startup) && !startup.IsStarted)
                {
                    startup.Start(GetAppStartHint(activationArgs));
                }
            }
            else
            {
                instance.PlatformSetup <MvxWindowsSetup>().UpdateActivationArguments(activationArgs);
            }
        }
        protected override void RunAppStart(IActivatedEventArgs activationArgs)
        {
            if (RootFrame?.Content == null)
            {
                MvxWindowsSetupSingleton.EnsureSingletonAvailable(RootFrame, activationArgs, nameof(Suspend)).EnsureInitialized();

                if (Mvx.IoCProvider.TryResolve(out IMvxAppStart startup) && !startup.IsStarted)
                {
                    startup.Start(GetAppStartHint(activationArgs));
                }

                var hostType = HostWindowsPageType();
                RootFrame.Navigate(hostType, (activationArgs as LaunchActivatedEventArgs)?.Arguments);
            }
            else
            {
                base.RunAppStart(activationArgs);
            }
        }