Exemple #1
0
        void SetActiveWorkspace(WorkspaceBaseVM workspace)
        {
            Debug.Assert(this.Workspaces.Contains(workspace));

            ICollectionView collectionView = CollectionViewSource.GetDefaultView(this.Workspaces);

            if (collectionView != null)
            {
                collectionView.MoveCurrentTo(workspace);
            }
        }
Exemple #2
0
        void ShowAllUsers()
        {
            WorkspaceBaseVM workspace = this.Workspaces.FirstOrDefault(vm => vm is AllUsersVM) as WorkspaceBaseVM;

            if (workspace == null)
            {
                workspace = new AllUsersVM(_userRepository, this);
                Workspaces.Add(workspace);
            }
            SetActiveWorkspace(workspace);
        }
Exemple #3
0
 public void CloseRequest(WorkspaceBaseVM workspace)
 {
     workspace.Dispose();
     this.Workspaces.Remove(workspace);
 }