Styles in Silverlight

In silverlight, normally we apply style per XAML file by adding the style into UserControl.Resources section. Sample below

http://pastebin.com/embed_iframe.php?i=FgjnHqAT

and to apply the style in the control we do

http://pastebin.com/embed_iframe.php?i=veWGiyNh

but let’s say you want to have a global style to all of your XAML, how do you do that?You can put your style into app.xaml and then the way to refer the style in your control is as per above so basically the way you apply the style will remain the same but the difference is only where you put the style

http://pastebin.com/embed_iframe.php?i=8cw0x8h0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s