Warm tip: This article is reproduced from stackoverflow.com, please click
c# user-interface uwp windows

How do I change colour of Reveal Highlight in NavigationView in UWP?

发布于 2020-04-07 10:08:42

Current Nav View colour
In my screenshot above, I would like to change the black highlight color in the above image to white. Would anyone know how to do this? This is a NavigationView control in UWP.

Questioner
Noobius
Viewed
58
Noobius 2020-02-03 09:17

I found a way to make it work, I set the RequestedTheme to Dark in NavigationView, and whatever is in the view I set it to light.

<NavigationView RequestedTheme="Dark" x:Name="MainNavView">
    <Frame RequestedTheme="Light" x:Name="MainFrame" Content=""/>
</NavigationView>

Some additional settings I use to style my Navigation View to blue:

<Grid.Resources>
    <SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="DodgerBlue"/>
    <SolidColorBrush x:Key="NavigationViewDefaultPaneBackground" Color="DodgerBlue" />
    <SolidColorBrush x:Key="NavigationViewSelectionIndicatorForeground" Color="White" />
</Grid.Resources>