O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Localizing Images Using Resx Files

The Resx Designer in Visual Studio 2012 has been improved and now provides better support for image files.

An image file can be added to a resx file by opening the resx file in design view and by selecting the Images item in the Resx Designer. You can then drag and drop an image file onto the Resx Designer surface.

An Image control can now be bound to a localized image, as shown in the following excerpt:

<Image Source="{Binding Resources.Instance.ImageResourceName,       Source={StaticResource BindableResources},       Converter={StaticResource BitmapImageConverter}}" />

As in the previous string resources example, the data-binding’s Source property uses the ResourceBindingWrapper ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required