void CreateNewWorkspace() { WorkspaceViewModel wvm = new WorkspaceViewModel(_bridge, _currentUser); // wvm.LoggedOut += PerformMassLogout; //added in OnWorkspacesChanged this.Workspaces.Add(wvm); this.SetActiveWorkspace(wvm); }
void SetActiveWorkspace(WorkspaceViewModel wvm) { ICollectionView collectionView = CollectionViewSource.GetDefaultView(this.Workspaces); if (collectionView != null) collectionView.MoveCurrentTo(wvm); }