对于我们应用程序的当前版本,我们不支持高对比度模式。对高对比度的支持(使用正确设计的 UI 等)是我们将在后续发布/更新中添加到我们的应用程序中的内容。
即使用户已将其设备置于高对比度模式,是否有一种简单的方法可以强制 UWP 应用使用默认主题?
在我的 app.xaml 中,我定义了以下内容:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="HighContrast">
copy/pasted styles into here
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
<ResourceDictionary x:Key="Default">
但是将from的内容复制C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.10586.0\Generic\themeresources.xaml
到我的应用程序的 HighContrast 主题字典中,认为即使设备进入 HighContrast 模式,这也会强制应用程序仍然使用默认主题,但这没有效果。
任何人都知道是否有办法强制应用程序使用默认主题?