Example #1
0
        private async Task NavigateBackAsync()
        {
            if (_currentFolder != null)
            {
                IOneDriveStorageFolder currentFolder = null;
                progressRing.IsActive = true;
                try
                {
                    if (!string.IsNullOrEmpty(_currentFolder.Path))
                    {
                        currentFolder = await _rootFolder.GetFolderAsync(_currentFolder.Path);
                    }
                    else
                    {
                        currentFolder = _rootFolder;
                    }

                    LstFolder.ItemsSource = await currentFolder.GetFoldersAsync();

                    _currentFolder = currentFolder;
                }
                catch (ServiceException ex)
                {
                    await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex);
                }
                finally
                {
                    progressRing.IsActive = false;
                }
            }
        }
Example #2
0
        private async Task NavigateToFolderAsync(IOneDriveStorageItem item)
        {
            progressRing.IsActive = true;
            try
            {
                var currentFolder = await _currentFolder.GetFolderAsync(item.Name);

                var items = await currentFolder.GetFoldersAsync(100);

                if (items.Count > 0)
                {
                    LstFolder.ItemsSource = items;
                    _currentFolder        = currentFolder;
                }
            }
            catch (ServiceException ex)
            {
                await OneDriveSampleHelpers.DisplayOneDriveServiceExceptionAsync(ex);
            }
            finally
            {
                progressRing.IsActive = false;
            }
        }