Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are SystemColors the same on all versions of Windows?

Tags:

c#

winforms

wpf

The .NET framework contains classes which define so called "system colors". For WinForms it's System.Drawing.SystemColors and for WP* it's System.Windows.SystemColors. I have two questions regarding that:

  1. Are the default values of system colors the same on all versions of Windows? If no where can i find the actual values?
  2. Are the system colors somehow configurable? Is it possible for the user to globally change the appearance of all applications using SystemColors?

If the colors indeed are changeable and I want to maintain the same look of my application regardless of user configuration of colors and OS version i assume i must not use the SystemColors and instead create my own colors configuration and use it throughout the code, is that right?

like image 647
Mariusz Jamro Avatar asked Dec 11 '22 16:12

Mariusz Jamro


1 Answers

1) No, the default colors have changed with different versions of Windows. Just compare XP to Win10 and you realize that the coloring is very different.

2) Yes, they are user configurable from "Control Panel\Appearance and Personalization\Personalization".

There is nothing that forces you to use the system colors inside of your app so if you don't refer to them it won't affect anything inside your app. It will however still affect the chrome parts of the window (i.e. border etc.)

like image 126
Niclas Avatar answered Jan 02 '23 12:01

Niclas