user2490629
user2490629

Reputation: 231

How to add files to the "StorageFolder" in design time?

We add files to the StorageFolder this way:

StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;

var dataFolder = await local.CreateFolderAsync("DataFolder",
    CreationCollisionOption.OpenIfExists);

var file = await dataFolder.CreateFileAsync("DataFile.txt",
CreationCollisionOption.ReplaceExisting);

But how can I add needed files in designer, there are some pictures,texts, how can I add them to use them later inside the app?

Upvotes: 0

Views: 103

Answers (1)

Oren
Oren

Reputation: 3248

Simply add the file to your project and make sure that Build Action is set to Content.

Upvotes: 1

Related Questions