Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When color theme is used, ContentDialog covers the whole page #46

Open
under3415 opened this issue Aug 29, 2020 · 1 comment
Open

When color theme is used, ContentDialog covers the whole page #46

under3415 opened this issue Aug 29, 2020 · 1 comment

Comments

@under3415
Copy link

under3415 commented Aug 29, 2020

Steps to replicate:

  1. Create new UWP app
  2. Grab a color scheme from Fluent XAML Theme Editor and add it to your project
  3. In App.Xaml add this:
     <Application.Resources>
      <ResourceDictionary>
       <ResourceDictionary.MergedDictionaries>
           <ResourceDictionary Source="Dictionary1.xaml"/>
      </ResourceDictionary.MergedDictionaries>
     </ResourceDictionary>
    </Application.Resources>
  1. Add a TextBlock and Loaded event to MainPage
  2. Add ContentDialog call to Loaded event
   private async void Page_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            ContentDialog noWifiDialog = new ContentDialog
            {
                Title = "No wifi connection",
                Content = "Check your connection and try again.",
                CloseButtonText = "Ok"
            };

            _ = await noWifiDialog.ShowAsync();
        }
  1. Run the app and see how ContentDialog covers up the TextBlock. If you remove the color theme this does not happen.
@under3415 under3415 changed the title When coleor theme is used, ContentDialog covers the whole page When color theme is used, ContentDialog covers the whole page Aug 29, 2020
@under3415
Copy link
Author

You need to add this to your theme to fix the ContentDialog issue

      <SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="#99000000" />
                            <StaticResource x:Key="ContentDialogLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant