public static SetText ( string text, bool alwaysShow ) : void | ||
text | string | |
alwaysShow | bool | |
return | void |
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously protected override async Task OnNavigatedToAsync(AlternativeNavigationEventArgs e) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { GC.Collect(); #pragma warning disable 4014 base.OnNavigatedToAsync(e); #pragma warning restore 4014 WindowTitleBar.SetText("WinRT XAML Toolkit Samples", true); }
protected override Task OnNavigatedToAsync(AlternativeNavigationEventArgs e) { var title = e.Parameter as string; WindowTitleBar.SetText("WinRT XAML Toolkit - " + title, true); //this.TitleTextBlock.Text = title; var sampleButton = MainPageViewModel.Instance.UngroupedSamples.First(s => s.Caption == title); var content = (FrameworkElement)Activator.CreateInstance(sampleButton.ViewType); this.ContentGrid.Children.Add(content); AddHandler(Control.KeyDownEvent, new KeyEventHandler(TestPage_OnKeyDown), true); Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown; return(base.OnNavigatedToAsync(e)); }