Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 10 FIle query issues

I am trying to follow the instructions to get files from the knownfolders in windows 10 as shown below,

https://msdn.microsoft.com/en-us/library/windows/apps/br227275.aspx

            try
            {
                StorageFolder folder = KnownFolders.PicturesLibrary;
                IReadOnlyList<StorageFile> pics = await folder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByDate, 0, 20);
                Debug.WriteLine(pics.Count);
            }

            catch(Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }

The same code works in WindowsPhone 8.1 SDK. But on Windows 10 mobile it does not. The exception i get is this,

The specified query options are not available for this folder because it is not within a library or Homegroup. Only folders within a library or a Homegroup support all options.

Any Ideas as to how to fix this ?

like image 334
golldy Avatar asked Apr 14 '26 03:04

golldy


1 Answers

Windows 10 is still under work. The latest build on the phone resolved this issue.

like image 177
golldy Avatar answered Apr 17 '26 06:04

golldy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!