How to make the background of navview transparent? #452
Replies: 2 comments
-
There are some brushes that affects the background. You can 'overload' them in your xaml by putting new brushes as resources with the same key as the brushes in this library and setting their color to transparent. Here is example in MainWindow.xaml considering that you have Grid and the NavigationView inside that grid.: <Grid>
<Grid.Resources>
<SolidColorBrush x:Key="NavigationViewTopPaneBackground" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewDefaultPaneBackground" Color="Transparent" />
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="Transparent" />
</Grid.Resources>
<ui:NavigationView Name="NavView">
...
</ui:NavigationView>
</Grid> Maybe you can add those brushes as resources to the navigation view itself, that would probably work too. I just remembered that I did it that way some time ago before moving them to separate resource dictionary. Anyway, I hope this will help you :) |
Beta Was this translation helpful? Give feedback.
-
thank you very much! this is useful! |
Beta Was this translation helpful? Give feedback.
-
How to make the background of navview transparent?
I added a background to the form, but the background of the navview navigation bar menu cannot be transparent, which is not beautiful.
Beta Was this translation helpful? Give feedback.
All reactions