Guidelines and checklist for application resources (Windows Store apps)

This topic describes best practices for using app resources in a Windows Store app.

Guidelines for creating resources

  • Do not put resources, such as UI strings and images, in code. Instead, put them into resource files, such as .resjson or .resw files.
  • Use qualifiers to support file and string resources that are tailored for different display scales, UI languages, or high contrast settings.
  • Set the default language in package.appxmanifest.
  • String resources, even those in the default language, should have a file or folder named with the language tag.
  • Add comments to your string resource for the localizer.

See How to name resources using qualifiers for more information on naming resources.

Guidelines for referring to resources

  • Add unique resource identifiers in the code and markup to refer to resources.
  • Refer to images in XAML, code, or manifests without the qualifiers.
  • Listen for events that fire when the system changes and it begins to use a different set of qualifiers. Reprocess the document so that the correct resources can be loaded.

See Globalizing your app for more information on translating UI resources and preparing for localization.

Security considerations

Patterns & Practices Security Guidance for Applications

Related topics

Roadmap for creating apps using C#, C++, or VB



Build date: 11/16/2013