public PicturesViewModel() { PreviousFolder = new UiCommand(o => PopFolder()); AddEventListener(this); PushFolder(Root); FoldersView.Refresh(); OnPropertyChanged(nameof(FoldersView)); }
private void PopFolder() { if (_foldersStack.Count == 0) { return; } _foldersStack.RemoveAt(_foldersStack.Count - 1); _folderTitle = _foldersStack[_foldersStack.Count - 1].Name; _folders.Source = _foldersStack[_foldersStack.Count - 1].Folders; FoldersView.Refresh(); OnPropertyChanged(nameof(FoldersView)); OnPropertyChanged(nameof(PicturesView)); }
public void PushFolder(Folder folder) { if (folder == null) { return; } if (_foldersStack.Count > 0) { _previousFolderTitle = _folderTitle; } _foldersStack.Add(folder); FolderTitle = folder.Name; _folders.Source = folder.Folders; FoldersView.Refresh(); OnPropertyChanged(nameof(FoldersView)); OnPropertyChanged(nameof(PicturesView)); }