
MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide
By :

Just like in real life, first impressions mean a lot. When your users need to fill out a form for example, which is more likely to get their attention, the plain old vanilla form or a customized styled form? The answer in most cases is a customized one.
Take a look at the following screenshots, which show the comparison between an unstyled (left) form and a styled (right) form in Silverlight:
![]() |
The styling controls in Silverlight are very similar to the styling controls in HTML using Cascading Style Sheets (CSS). While it is possible (and valid) to add the style tag on almost any HTML elements and set all kinds of properties such as direction, font-weight, color, and so on; it can get messy (and not very readable) very fast. CSS was invented to help separate the visual code from the functional code, instead of setting the same style over and over again, for elements (like the textboxes in our form example) you can create a class once and just set it...
Change the font size
Change margin width
Change background colour