Skip Navigation LinksHome / Tips / View Tip

Tip: How to declare static resources in the scope of a Silverlight application?

+ Add to SilverlightShow Favorites
0 comments   /   posted by Denislav Savkov on Sep 02, 2008
(0 votes)
Categories: Resources

Application static resources are used to declare instances of objects that should be alive and reusable throughout the whole life of an application. Usually as static resources are declared such things as styles, templates etc. Thus they can be used multiple times from multiple places within your Silverlight application.


   <Application xmlns=""
               <Style x:Name="simpleStyle" TargetType="Button">
                   <Setter Property="Content" Value="Static style content"></Setter>
Note that for each resource you declare x:Name or x:Key should be specified!
That's it!


Comments RSS RSS
No comments

Add Comment


Please add 8 and 3 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)