Countdown to Silverlight 3 #6: System colors

by Andrej Tozon 30. June 2009 14:59

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.

image image
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:

Tags:

Development | Silverlight

Comments

7/9/2009 11:45:20 AM #

pingback

Pingback from currentnewstrends.net

Silverlight 3 »  Current News Trends

currentnewstrends.net | Reply

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading





Andrej Tozon
Andrej Tozon's on Twitter View Andrej Tozon's profile on LinkedIn Subscribe to me on FriendFeed Andrej Tozon's Facebook profile

MVP - Client Application Developer

Microsoft Certified Solution Developer

MSN Alerts

Get help from Andrej Tozon!

 

Currently reading


Microsoft Silverlight 4 Data and Services Cookbook

Stay tuned for the review... In the mean time, you can read an excerpt from the book.

RecentComments

Comment RSS