How to ignore “ease of access” settings on Windows Phone?

旧城冷巷雨未停 提交于 2019-12-11 16:19:41

问题


There are 'TextSize' and 'High contrast' settings in 'ease of access' settings category on Windows Phone. Is there a way to ignore them or make an app to follow my own accessibility styles?


回答1:


It's a common bug in apps that they ignore the high contrast settings and hardcode their own colours. So yes: you can do this by doing the wrong thing and hardcoding your settings instead of using the system resources. You can override most system brushes in your app resources in app.xaml and you can hardcode colours in your Xaml and control styles.

That said, please use this for good not evil. People choose these options because they need them. Use the HighContrast dictionary to make sure your non-standard styles follow the users high contrast theme request rather than to avoid it:

<ResourceDictionary.ThemeDictionaries> 
    <ResourceDictionary x:Key="Default"> 
        <ImageBrush x:Key="PageBackground" Stretch="Fill" ImageSource="Assets/owlvcrow.jpg"/> 
    </ResourceDictionary> 
    <ResourceDictionary x:Key="HighContrast"> 
        <SolidColorBrush x:Key="PageBackground" Color="{ThemeResource SystemColorWindowColor}" /> 
    </ResourceDictionary> 
</ResourceDictionary.ThemeDictionaries> 


来源:https://stackoverflow.com/questions/26995376/how-to-ignore-ease-of-access-settings-on-windows-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!