Exemple #1
0
        private async Task InitAsync(SplashScreen splash)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif
            var appShell = AppShell.GetForCurrentView();

            if (appShell == null)
            {
                //create app shell to hold app content
                appShell = AppShell.CreateForWindow(Window.Current);

                //create extended splash screen
                ExtendedSplashScreen extendedSplash = new ExtendedSplashScreen(splash, false);
                //temporarily place splash into the root frame
                appShell.UnderlyingFrame.Content = extendedSplash;

                SetupWindowServices(Window.Current);
                await InitializeMvvmCrossAsync();

                //setup the title bar
                await SetupTitleBarAsync();

                InitializeStyle();
            }
            CoreApplication.EnablePrelaunch(true);
            // Ensure the current window is active
            Window.Current.Activate();
        }