Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(UWP) Getting xml files from assets folder

I have a "Localization" folder in the "Assets" directory of my UWP project. The folder contains different xml-files that I want to read into a textmanager. When I create a new DirectoryInfo-object like this

 new DirectoryInfo("/Assets/Localization");

it can't find the directory. Do I have to pass another root directory prefix for where the app is stored?

like image 721
stonecompass Avatar asked Oct 19 '15 17:10

stonecompass


1 Answers

This should work:

 var localizationDirectory = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(@"Assets\Localization");
like image 158
gregkalapos Avatar answered Oct 16 '22 21:10

gregkalapos