(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Internationalization/Globalization in Silverlight - Part 3 - What is a resx file, and how should I use it?

(1 votes)
Ross Wozniak
>
Ross Wozniak
Joined Feb 19, 2010
Articles:   9
Comments:   0
More Articles
0 comments   /   posted on Feb 26, 2010

This article is compatible with the latest version of Silverlight.

A .resx file is a place where application developers can store resources that are used in their apps. By resources I mean things like text and images that appear in the UI.

Resources – An overloaded term

Resources can mean several things to a developer, especially in Silverlight. Several years ago when I would have a Resources directory in my ASP.NET app, and it would have subdirectories for my Images, CSS files and JavaScript files.

In a Silverlight project there are no CSS or JavaScript files (though there may be JavaScript files in the Web project), but you may still want subdirectories for Images and Styles (XAML files that provide custom style information). The Microsoft recommended name for the directory that contains these subdirectories is Assets.

Silverlight also has a notion of StaticResources (and WPF has DynamicResources), so keep in mind that the term Resources can get a little confusing.

How do I create .resx files?

.resx files can be easily created in VisualStudio by right-clicking on the desired folder, selecting Add > New Item, and selecting Resource File from the Add New Item dialog. This is demonstrated in the Step by step example – MVVM approach post.


Subscribe

Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

From this series