AppShell.TestApp.App.OnLaunched C# (CSharp) Method

OnLaunched() protected method

protected OnLaunched ( LaunchActivatedEventArgs args ) : void
args Windows.ApplicationModel.Activation.LaunchActivatedEventArgs
return void
        protected override void OnLaunched(LaunchActivatedEventArgs args)
        {
            var rootFrame = Window.Current.Content as Frame;

            if (rootFrame == null)
            {
                rootFrame = new Frame();
                Window.Current.Content = rootFrame;
            }

            if (args.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                    rootFrame.Navigate(typeof(MainPage), args.Arguments);

                Window.Current.Activate();
            }
        }