Skip to content
Discussion options

You must be logged in to vote

Problem solved!
ContentGrid is defined in WinUI NavigationView.xaml.
To set the window background brush, we simply overwrite theme resource "NavigationViewContentBackground".

#if WINDOWS
        builder.ConfigureLifecycleEvents(events =>
        {
            events.AddWindows(lifecycle =>
            {
                lifecycle.OnWindowCreated(window =>
                {
                    window.SystemBackdrop = new TransparentTintBackdrop();

                    Microsoft.UI.Xaml.Application.Current.Resources["NavigationViewContentBackground"] =
                        new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.Transparent);
                });
            });
   …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@CodyLyttle
Comment options

@CodyLyttle
Comment options

@dotMorten
Comment options

@CodyLyttle
Comment options

Comment options

You must be logged in to vote
1 reply
@CodyLyttle
Comment options

Answer selected by CodyLyttle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants