public async void Loaded() { foreach (var knownFolder in ShellKnownFolders.EnumerateKnownFolders()) { this.KnownFolders.Add(await ShellKnownFolderViewModel.CreateAsync(knownFolder)); } }
public static Task <ShellKnownFolderViewModel> CreateAsync(ShellKnownFolder shellKnownFolder) { return(Task.Run(() => { var result = new ShellKnownFolderViewModel(shellKnownFolder); result.Thumbnail.Value = new ShellImageSource(shellKnownFolder.GetThumbnail(ThumbnailMode.ListView)); return result; })); }