O'Reilly logo

Beginning Silverlight 5 in C#, Fourth Edition by Robert Lair

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  12

Styling in Silverlight

Of course, you will want to create a rich appearance for your Silverlight application. You'll make choices about your design. What font size and family will you use? How much space will you place between your objects? What size of text boxes and buttons will you use?

As you'll learn in this chapter, you can control the styles of your Silverlight application's UI elements in several ways. The first approach you'll explore is the straightforward use of inline properties. Then you'll look at how to define and apply Silverlight styles.

Inline Properties

You can simply define style properties directly in the object definitions. As an example, the following code snippet sets the FontFamily, FontSize, FontWeight ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required