I have a NavigationView
and would like to change the header background color:
I have tried:
generic.xaml
for likely styles to overrideHere's my code:
<NavigationView Background="Gray">
<NavigationView.Header>
<Border Background="Green">
<TextBlock Text="Header"/>
</Border>
</NavigationView.Header>
<Border Background="Orange">
<TextBlock Text="Sweet content"/>
</Border>
</NavigationView>
Try to override the NavigationViewContentBackground
theme resource:
<NavigationView Background="Gray">
<NavigationView.Resources>
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Red" />
</NavigationView.Resources>
<NavigationView.Header>
<Border Background="Green">
<TextBlock Text="Header"/>
</Border>
</NavigationView.Header>
<Border Background="Orange">
<TextBlock Text="Sweet content"/>
</Border>
</NavigationView>