diff --git a/Samples/Windowing/cs-winui/WindowBasicsPage.xaml.cs b/Samples/Windowing/cs-winui/WindowBasicsPage.xaml.cs index 0fe2b07ee..3907c2a12 100644 --- a/Samples/Windowing/cs-winui/WindowBasicsPage.xaml.cs +++ b/Samples/Windowing/cs-winui/WindowBasicsPage.xaml.cs @@ -24,7 +24,8 @@ private async void TitleBtn_Click(object sender, RoutedEventArgs e) { Title = "Single line text only!", Content = "Only a single line of text is supported for a window titlebar. Please modify your text accordingly.", - CloseButtonText = "Ok" + CloseButtonText = "Ok", + XamlRoot = this.XamlRoot }; ContentDialogResult result = await errorDialog.ShowAsync(); }