@@ -40,6 +40,7 @@ public class ItemViewModel
40
40
static string gotFolPath ;
41
41
static string gotFolType ;
42
42
static Visibility gotFileImgVis ;
43
+ static Visibility gotEmptyImgVis ;
43
44
static Visibility gotFolImg ;
44
45
static StorageItemThumbnail gotFileImg ;
45
46
public static ObservableCollection < Classic_ListedFolderItem > ChildrenList ;
@@ -225,6 +226,7 @@ public async void MemoryFriendlyGetItemsAsync(string path, CancellationToken tok
225
226
gotFolType = "Folder" ;
226
227
gotFolImg = Visibility . Visible ;
227
228
gotFileImgVis = Visibility . Collapsed ;
229
+ gotEmptyImgVis = Visibility . Collapsed ;
228
230
229
231
230
232
if ( pageName == "ClassicModePage" )
@@ -233,7 +235,7 @@ public async void MemoryFriendlyGetItemsAsync(string path, CancellationToken tok
233
235
}
234
236
else
235
237
{
236
- FilesAndFolders . Add ( new ListedItem ( ) { ItemIndex = FilesAndFolders . Count , FileImg = null , FileIconVis = gotFileImgVis , FolderImg = gotFolImg , FileName = gotFolName , FileDate = gotFolDate , FileExtension = gotFolType , FilePath = gotFolPath } ) ;
238
+ FilesAndFolders . Add ( new ListedItem ( ) { EmptyImgVis = gotEmptyImgVis , ItemIndex = FilesAndFolders . Count , FileImg = null , FileIconVis = gotFileImgVis , FolderImg = gotFolImg , FileName = gotFolName , FileDate = gotFolDate , FileExtension = gotFolType , FilePath = gotFolPath } ) ;
237
239
}
238
240
}
239
241
index += step ;
@@ -291,8 +293,13 @@ public async void MemoryFriendlyGetItemsAsync(string path, CancellationToken tok
291
293
BitmapImage icon = new BitmapImage ( ) ;
292
294
if ( gotFileImg != null )
293
295
{
296
+ gotEmptyImgVis = Visibility . Collapsed ;
294
297
icon . SetSource ( gotFileImg . CloneStream ( ) ) ;
295
298
}
299
+ else
300
+ {
301
+ gotEmptyImgVis = Visibility . Visible ;
302
+ }
296
303
gotFileImgVis = Visibility . Visible ;
297
304
298
305
if ( pageName == "ClassicModePage" )
@@ -301,7 +308,7 @@ public async void MemoryFriendlyGetItemsAsync(string path, CancellationToken tok
301
308
}
302
309
else
303
310
{
304
- FilesAndFolders . Add ( new ListedItem ( ) { FileImg = icon , FileIconVis = gotFileImgVis , FolderImg = gotFolImg , FileName = gotName , FileDate = gotDate , FileExtension = gotType , FilePath = gotPath } ) ;
311
+ FilesAndFolders . Add ( new ListedItem ( ) { EmptyImgVis = gotEmptyImgVis , FileImg = icon , FileIconVis = gotFileImgVis , FolderImg = gotFolImg , FileName = gotName , FileDate = gotDate , FileExtension = gotType , FilePath = gotPath } ) ;
305
312
}
306
313
}
307
314
index += step ;
0 commit comments