public IntlNotamDetailViewModel(NotamDetail notam, NotamDetailService notamDetailService, IntlNotamService notamService, ObservableCollection<WorkspaceViewModel> parent, WorkspaceViewModel ntmWorkspace) { parentWorkSpaces = parent; NotamWorkspace = ntmWorkspace; if (notam == null) throw new ArgumentNullException("notam"); if (notamService == null) throw new ArgumentNullException("notamService"); if (notamDetailService == null) throw new ArgumentNullException("notamDetailService"); _notam = notam; _notamDetailService = notamDetailService; _notamService = notamService; this.validators = this.GetType() .GetProperties() .Where(p => this.GetValidations(p).Length != 0) .ToDictionary(p => p.Name, p => this.GetValidations(p)); this.propertyGetters = this.GetType() .GetProperties() .Where(p => this.GetValidations(p).Length != 0) .ToDictionary(p => p.Name, p => this.GetValueGetter(p)); }
void SetActiveWorkspace(WorkspaceViewModel workspace) { Debug.Assert(this.Workspaces.Contains(workspace)); ICollectionView collectionView = CollectionViewSource.GetDefaultView(this.Workspaces); if (collectionView != null) collectionView.MoveCurrentTo(workspace); }
protected void SetActiveWorkspace(WorkspaceViewModel workspace) { ICollectionView collectionView = CollectionViewSource.GetDefaultView(parentWorkSpaces); if (collectionView != null) collectionView.MoveCurrentTo(workspace); }