Centralizing settings in styles


show more Centralizing settings in styles provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training show less
please wait ...

Centralizing settings in styles

Web programmers figured out a long time ago that it doesn't make sense to set the same property values repeatedly on an element. That's why we have CSS style sheets on most web pages today. Silverlight, while not a web page technology, suffers from the same issues. Writing the same property settings on multiple elements is tedious and makes change management harder. In this screenshot, I have two elements with exactly the same properties set on each individual text box. When client changes their mind and picks orange instead of the yellow foreground, we have to search out every text box in this application and determine if it needs to change.

Silverlight provides styles to alleviate this problem. A style is a collection of property settings. Any value that can be set on a property can be set in the style. This also can contain property setters. They can contain animation and storyboards. They could also contain control templates. Here is an example of the inline style. I have a butt...

Centralizing settings in styles
Video duration: 4m 8s 8h 52m Beginner

Viewers:

Centralizing settings in styles provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training

Subject:
Developer
Software:
Silverlight Visual Studio
Author:
please wait ...