private void AddTabItemViewModel() { var vm = new DirectoryTabItemViewModel(); DirectoryTabItems.Add(vm); CurrentDirectoryTabItem = vm; }
private void CloseTab(DirectoryTabItemViewModel vm) { var isCurrent = CurrentDirectoryTabItem == vm; DirectoryTabItems.Remove(vm); if (isCurrent) { CurrentDirectoryTabItem = DirectoryTabItems.LastOrDefault(); } }