Defined Light theme (<AcrylicBrush
TintColor="Red"/>
), Dark, (<AcrylicBrush
TintColor="Orange"/>
) in App.xaml. Per this post, Changing UWP project's Target Version from 1803 to 1809 disables NavigationView's Acrylic texture - why?, I added the following to ShellPage.xaml. The expected behavior when I toggle between Light and Dark theme is that the app NavigationView
control will have an AcrylicBrush
tint that toggles between Red and Orange. In the definition below, actual behavior is it stays Orange.
ShellPage.xaml:
<Page.Resources>
<StaticResource x:Key="NavigationViewExpandedPaneBackground"
ResourceKey="MyAcrylicBrush"/>
</Page.Resources>
App.xaml:
<Application
x:Class="TEST.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<AcrylicBrush x:Key="MyAcrylicBrush"
BackgroundSource="HostBackdrop"
TintColor="Green"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Green"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewTopPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Green"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Green"
TintOpacity="0.8" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<AcrylicBrush x:Key="MyAcrylicBrush"
BackgroundSource="HostBackdrop"
TintColor="Orange"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Orange"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewTopPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Orange"
TintOpacity="0.8" />
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Orange"
TintOpacity="0.8" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<AcrylicBrush x:Key="MyAcrylicBrush"
BackgroundSource="HostBackdrop"
TintColor="Red"
TintOpacity="1"/>
<AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Red"
TintOpacity="1" />
<AcrylicBrush x:Key="NavigationViewTopPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Red"
TintOpacity="1" />
<AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="Red"
TintOpacity="1"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>