public async Task Fill(StorageFolder mainfolder) { if (SourcePrivate.Count > 0) { SourcePrivate.Clear(); } MainFolder = mainfolder; IndexedState folderIndexedState = await MainFolder.GetIndexedStateAsync(); if (folderIndexedState == IndexedState.NotIndexed || folderIndexedState == IndexedState.Unknown) { //Only possible in indexed directories. } else { //this method only works for indexed stuff ( known folders only ) //For More Details visit https://blogs.msdn.microsoft.com/adamdwilson/2017/12/20/fast-file-enumeration-with-partially-initialized-storagefiles/ await FillUpFolders(); FillAds(); await FillUpFiles(); } }