WinRTXamlToolkit.Sample.AppShell.InitializeFrame C# (CSharp) Method

InitializeFrame() private method

private InitializeFrame ( object args ) : void
args object
return void
        private void InitializeFrame(object args)
        {
            Frame = this.RootFrame;
            var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
            coreTitleBar.ExtendViewIntoTitleBar = true;
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            Frame.NavigateAsync(typeof(MainPage), args);
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
            Frame.Navigated += async (s, e) =>
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = Frame.CanGoBack ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;
                WindowTitleBar.Instance.IsBackButtonVisible = Frame.CanGoBack;
            };
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
            SystemNavigationManager.GetForCurrentView().BackRequested += async (s, e) => await Frame.GoBackAsync();
            WindowTitleBar.Instance.BackButtonClicked += async (s, e) => await Frame.GoBackAsync();
        }