November 9th, 2020

Why aren’t my custom backgrounds, animations, and colors working, such as ApplicationViewTitleBar colors?

There are various places you can specify a preferred color. For example, if you are a UWP app, you can set your app’s custom title bar colors with properties like Application­View­Title­Bar.Background­Color.

But those colors are subject to user and system policies.

The most common case where your app colors may be ignored or altered is if the system is in a high-visibility mode such as High Contrast mode. Other scenarios include color filters (to assist users with color-blindness or other visual impairments) and Night light mode.

Backgrounds may be suppressed if the user disables overlapping content (such as a foreground image overlaid atop a background image), and animations may be suppressed if the user disables animated content. Users who have disabilities related to visual processing may choose to do these things to make their system easier to use.

In general, you shouldn’t be using colors to convey important information, since a portion of your audience won’t be able to see them. The intent of the Application­View­Title­Bar color customization is to permit apps to customize the colors to match their branding.

Bonus chatter: Adjusting for user and system preferences for colors and animations are typically handled by UI frameworks. But if you are writing your own control, then it is typically your responsibility to follow the settings. For example, the stock controls like combo boxes and list views follow animation preferences and high contrast settings, but if your app does its own custom animation or has its own custom colors, then it’s on you to check whether the user wants them.

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.