In UWP , my app created a file ,then i wang to get its Thumbnail,but it return a wrong thumbnail

104 Views Asked by At
  1. My uwp app create a .jpg file, then use the API storagefile.getThumbnail() .but it return a thumbnail that represents common jpg file type rather than a show the small size of jpg content;

  2. I checked the created jpg file,it's a complete file,and its thumbnail in explorer is the same as is my app.

  3. I stop the app,the thumbnail of explorer immediately refreshed,it's just represent the samll size of its content;

  4. I restarted the app,and it can normally show the right thumbnail;

Manga manga = new Manga(files[i], storageFolder);
MangaList.Add(manga);  // This is a observableCollection                                                                                          
await manga.EnsureCoverFile(); // create a jpg file
await manga.SetCover();  // get the thumbnail of file

I gusses that because of the running time app,windows os won't refresh the thumbnail .After tha app is stoped ,os do its work imemediately.

So that is there any ways or APIs to call system refresh zhe thumbnail while app is running?

enter image description here

0

There are 0 best solutions below