首先,我很抱歉我的英語不好。
我想更改以下代碼:
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<AcrylicBrush
x:Key="NavigationViewExpandedPaneBackground"
BackgroundSource="HostBackdrop"
TintColor="{ThemeResource SystemChromeAltHighColor}"
TintOpacity="0.6"
FallbackColor="{ThemeResource SystemChromeMediumColor}" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush
x:Key="NavigationViewExpandedPaneBackground"
Color="{ThemeResource SystemColorWindowColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Page.Resources>
喜歡這個:
<Page.Resources>
<???
x:key="NavigationViewExpandedPaneBackground"
???="{ThemeResource SystemControlChromeMediumAcrylicWindowMediumBrush}"
</Page.Resources>
我嘗試過 Setter、Style 等,但都失敗了。如何實作我想要的?
uj5u.com熱心網友回復:
對于您的場景,您可以使用 StaticResource 來轉換上述代碼。
<StaticResource x:Key="NavigationViewExpandedPaneBackground" ResourceKey="SystemControlChromeMediumAcrylicWindowMediumBrush"/>
有關更多詳細資訊,請參閱StaticResource檔案。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/399698.html
