With Silverlight 3, we now have access to system colors. If you need your new application to visually fit into the operating system it’s running on, simply inspect one of the static properties, provided by the new SystemColors class – System.HighlightColor for example, will tell you what color is used for highlighting the selection in ListBoxes.
The provided example (below) will enumerate all available system colors and display them on the screen. To test it, go to your Control Panel and change the color scheme, then restart the application.
Windows Aero vs. High Contrast Black
Additional reading
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/29/
silverlight-3-system-colours.aspx
Run the sample online
Source code below:
d17889af-2c89-4e39-8c86-00d73807be37|2|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :