Wednesday, July 29, 2009

New features in Silverlight 3: better styles, high contrast & system colors

Today I present new features of styles and integration with operating system display settings.

Styles

Now styles can be applied more than once. It is possible to build a new style based on an existing style. You can also manage easier resources (see Merged Resource Dictionaries).

Here is my sample using these new features.

styles1-sh styles2-sh styles3-sh

High-Contrast

Users can increase the contrast in the operating system to improve interface visibility. Control code can examine the HighContrast property, and should use techniques to increase visibility when operating in high-contrast mode. On computers that run Windows, the HighContrast property is true when the user has enabled High Contrast in Control Panel. On Macintosh computers, HighContrast is true when the user has selected the White on Blackoption in Universal Access.

System colors

Silverlight 3 now supports operating system colors. In System.Windows namespace exists new static class SystemColors with colors definitions. Those colors could be use as a Color in any brushes.

Here is my sample application using the HighContrast property and SystemColors class.

contrast1-sh contrast2-sh

No comments: