Resources Overview

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Silverlight-based applications can access a variety of resources from the following locations:

  • The host server and other network locations.

  • Files that are embedded in a library assembly internal or that are external to the application package.

  • Files that are loose within the application package.

  • Font files that are compiled into assemblies.

For example, a resource might be displayed in an application as error messages or as part of the user interface. A resource is any non-executable data that is logically deployed with an application.

Silverlight-based applications cannot use resource data types that depend on serialization. For a list of data types that do not depend on serialization and those that do, see the ResourceManager class.

Resource Files and Dictionaries

You can embed resource files and content files in an application assembly or get them from the server on demand. Storing your data in a resource file enables you to change the data without recompiling your entire application. For more information about configuring and accessing resource files, see Resource Files. This topic also describes the fallback chain, which is the model for using URIs to look up resources.

Resource dictionaries are a separate concept from resource files, although the build actions, the application model, and the concept of resources for general development all participate in the larger picture of how a resource dictionary works. Resource dictionaries are intended as a resource mechanism for individual objects that are defined in XAML, often with the intention of using the definition more than once in an application. For more information, see Resource Dictionaries.

Resource Localization

You can localize your application's resources for specific cultures. This enables you to build localized (translated) versions of your applications. An application loads the appropriate localized resources based on the configuration of the Silverlight.js file. For more information, see Deployment and Localization.

Isolated Storage Settings

In addition to using resources, you can save application settings in isolated storage as key/value pairs. You can initialize applications with a set of default settings, and then easily access and modify them. For more information, see How to: Store and Retrieve Application Settings Using Isolated Storage.

See Also

Concepts