diff --git a/src/settings-ui/Settings.UI/OOBE/Views/OobeWhatsNew.xaml.cs b/src/settings-ui/Settings.UI/OOBE/Views/OobeWhatsNew.xaml.cs index 4b18330e41a8..09cf76b3cfc4 100644 --- a/src/settings-ui/Settings.UI/OOBE/Views/OobeWhatsNew.xaml.cs +++ b/src/settings-ui/Settings.UI/OOBE/Views/OobeWhatsNew.xaml.cs @@ -85,15 +85,26 @@ private async void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e) TitleTxt.Text = loader.GetString("Oobe_WhatsNew"); try { - ReleaseNotesMarkdown.Text = await GetReleaseNotesMarkdown(); - ReleaseNotesMarkdown.Visibility = Windows.UI.Xaml.Visibility.Visible; - LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + string releaseNotesMarkdown = await GetReleaseNotesMarkdown(); + + // Make sure we run in the UI thread. await doesn't seem to guarantee it. + await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => + { + ReleaseNotesMarkdown.Text = releaseNotesMarkdown; + ReleaseNotesMarkdown.Visibility = Windows.UI.Xaml.Visibility.Visible; + LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + }); } catch (Exception ex) { Logger.LogError("Exception when loading the release notes", ex); - LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed; - ErrorInfoBar.Visibility = Windows.UI.Xaml.Visibility.Visible; + + // Make sure we run in the UI thread. await doesn't seem to guarantee it. + await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => + { + LoadingProgressRing.Visibility = Windows.UI.Xaml.Visibility.Collapsed; + ErrorInfoBar.Visibility = Windows.UI.Xaml.Visibility.Visible; + }); } }