SurveyApp/App.xaml.cs
/// <summary>
/// Invoked when the application is launched normally by the end user.  Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
Invoked when the application is launched normally by the end user.  Other entry points
will be used such as when the application is launched to open a specific file.
Invoked when the application is launched normally by the end user . Other entry points will be used such as when the application is launched to open a specific file .
protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            #if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
            #endif
            this.shell = Window.Current.Content as Shell;
            Frame rootFrame = null;
            if (this.shell == null)
            {
                this.shell = new Shell();
            }
            if (rootFrame == null)
            {
                rootFrame = new Frame();
                rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0];
                rootFrame.NavigationFailed += OnNavigationFailed;
                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                }
            }
            shell.DataContext = rootFrame;
            Window.Current.Content = shell;
            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(Home), e.Arguments);
            }
            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();
                statusBar.BackgroundColor = (App.Current.Resources["SystemControlBackgroundAccentBrush"] as SolidColorBrush).Color;
                statusBar.BackgroundOpacity = 1;
            }
            Window.Current.Activate();
        }
protected override void OnLaunched ( LaunchActivatedEventArgs e ) { if DEBUG if ( System . Diagnostics . Debugger . IsAttached ) { this . DebugSettings . EnableFrameRateCounter = true ; } endif this . shell = Window . Current . Content as Shell ; Frame rootFrame = null ; if ( this . shell == null ) { this . shell = new Shell ( ) ; } if ( rootFrame == null ) { rootFrame = new Frame ( ) ; rootFrame . Language = Windows . Globalization . ApplicationLanguages . Languages [ 0 ] ; rootFrame . NavigationFailed += OnNavigationFailed ; if ( e . PreviousExecutionState == ApplicationExecutionState . Terminated ) { } } shell . DataContext = rootFrame ; Window . Current . Content = shell ; if ( rootFrame . Content == null ) { rootFrame . Navigate ( typeof ( Home ) , e . Arguments ) ; } if ( Windows . Foundation . Metadata . ApiInformation . IsTypePresent ( " " ) ) { var statusBar = Windows . UI . ViewManagement . StatusBar . GetForCurrentView ( ) ; statusBar . BackgroundColor = ( App . Current . Resources [ " " ] as SolidColorBrush ) . Color ; statusBar . BackgroundOpacity = 1 ; } Window . Current . Activate ( ) ; }
Invoked when the application is launched normally by the end user.
Invoked when the application is launched normally by the end user .
// Do not repeat app initialization when the Window already has content, // just ensure that the window is active // create new shell // Create a Frame to act as the navigation context and navigate to the first page // Set the default language // Place the shell with frame as content in the current Window // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter // Zkontroluje, zda apliakce běží na telefonu a nastaví barvu statusbaru na uživatelem zvolenou barvu tématu // Ensure the current window is active
e
LaunchActivatedEventArgs
Details about the launch request and process.
Details about the launch request and process .