Winui3 - Navigationview default color white instead of grayscale

63 views Asked by At

I'am a little bit confused. I created a Navigationview and my expectation was, that the color is like that. Which means, two different gray scales.

Winui3 Gallery Example

But in my case it looks like fully white. I thought the default colors are gray scales?

My app

I know that I can change the pane background but it makes no sense, because in the WinUi3 Gallery I didnt find such a property. It looks like that there the colors are default

        <NavigationView.Resources>
            <SolidColorBrush x:Key="NavigationViewTopPaneBackground"
                             Color="Red" />
        </NavigationView.Resources>

So do you know what I have to do to get the default colors like in WinUI3 Gallery for Light and dark theme?

1

There are 1 answers

0
YangXiaoPo-MSFT On BEST ANSWER

I can reproduce it. Due to Winui3 Gallery uses the NavigationViewHeaderTemplate HeaderTemplate whose background is transparent and the Grid's Background is ApplicationPageBackgroundThemeBrush there are two different gray scales. Note that Winui3 Gallery has updated its code.

reproduced code example