private async Task NavigateBackGraphAsync() { if (_graphCurrentFolder != null) { Toolkit.Services.OneDrive.OneDriveStorageFolder currentFolder = null; Shell.Current.DisplayWaitRing = true; try { if (!string.IsNullOrEmpty(_graphCurrentFolder.Path)) { currentFolder = await _graphRootFolder.GetFolderAsync(_graphCurrentFolder.Path); } else { currentFolder = _graphRootFolder; } OneDriveItemsList.ItemsSource = await currentFolder.GetItemsAsync(20); _graphCurrentFolder = currentFolder; } catch (ServiceException ex) { await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex); } finally { Shell.Current.DisplayWaitRing = false; } } }
private async Task NavigateToFolderAsync(Toolkit.Services.OneDrive.OneDriveStorageItem item) { if (item.IsFolder()) { Shell.Current.DisplayWaitRing = true; try { var currentFolder = await _graphCurrentFolder.GetFolderAsync(item.Name); OneDriveItemsList.ItemsSource = await currentFolder.GetItemsAsync(20); _graphCurrentFolder = currentFolder; } catch (ServiceException ex) { await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex); } finally { Shell.Current.DisplayWaitRing = false; } } }
private async Task NavigateToFolderAsync(Toolkit.Services.OneDrive.OneDriveStorageItem item) { progressRing.IsActive = true; try { var currentFolder = await _graphCurrentFolder.GetFolderAsync(item.Name); var items = await currentFolder.GetFoldersAsync(100); if (items.Count > 0) { LstFolder.ItemsSource = items; _graphCurrentFolder = currentFolder; } } catch (ServiceException ex) { await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex); } finally { progressRing.IsActive = false; } }