O'Reilly logo

XAML Unleashed by Adam Nathan

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

Loading File Variations Automatically

Fortunately, for Windows Store and universal apps, Windows exposes a simple yet powerful built-in scheme for handling automatic scaling for any image file packaged in your app. You can provide three separate variations, one for each possible scale. If you follow one of two naming conventions, then the Image element automatically uses the correct one for the current environment.

For example, if you set an Image’s Source to Assets/photo.jpg, then you can name the three variations of this file as follows to take advantage of this automatic support:

Image Assets/photo.scale-100.jpg

Assets/photo.scale-140.jpg

Assets/photo ...

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