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 ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.