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

Binary Resources in Windows Store and Universal Apps

In addition to examining files packaged with your app with a Build Action of Content (as with WPF), this section examines the three types of app files usable by Windows Store and Universal apps: local files, roaming files, and temporary files.

Packaged Files

Although you can’t add or edit the files packaged with your app, you can retrieve one as follows:

StorageFolder folder = Package.Current.InstalledLocation;StorageFile file = await folder.GetFileAsync("Assets\\Logo.png");

This file location corresponds to the URI ms-appx:///Assets/Logo.png that you can use in XAML. This works for any files marked with a Build Action of Content in your project.

Local Files ...

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