Windows runtime 应用程序页面背景电脑不工作?

Windows runtime 应用程序页面背景电脑不工作?,windows-runtime,winrt-xaml,Windows Runtime,Winrt Xaml,我想将页面背景设置为用户选择的默认主题颜色 我使用: Background=“{StaticResource应用程序页面背景Themebrush}” 但这只是返回一个透明的背景。这不是默认主题颜色的正确方式吗?Windows 8-8.1答案 否事实上,Windows应用商店应用程序无法访问用户选择的强调色 Windows 10答案 (Color)Application.Current.Resources[“SystemAccentColor”]为您提供当前的强调色,您可以使用新建UISetti

我想将页面背景设置为用户选择的默认主题颜色 我使用:

Background=“{StaticResource应用程序页面背景Themebrush}”

但这只是返回一个透明的背景。这不是默认主题颜色的正确方式吗?

Windows 8-8.1答案

否事实上,Windows应用商店应用程序无法访问用户选择的强调色

Windows 10答案


(Color)Application.Current.Resources[“SystemAccentColor”]
为您提供当前的强调色,您可以使用
新建UISettings().ColorValuesChanged
事件监视更改。

此外,FWIW,它不应该是透明的,它可以是白色/黑色(ish),除非您已明确覆盖画笔的值。