/// <summary> /// Called whenver a subview becomes active. This is used to track what subview is currently active. /// </summary> /// <param name="eventArgs"></param> protected override void ReactOnViewActivation(ActiveViewChangedEventArgs eventArgs) { if (eventArgs.SourceViewModel == null) { return; } if (!this.AllViewModels.Contains(eventArgs.SourceViewModel) && !this.UnknownOpenedModels.Contains(eventArgs.SourceViewModel)) { return; } if (eventArgs.IsActive) { // System.Windows.MessageBox.Show("Active view is: " + eventArgs.SourceViewModel); if (this.ActiveViewModel != null && this.ActiveViewModel != eventArgs.SourceViewModel) { this.ActiveViewModel.IsActiveView = false; } this.LayoutManager.Activate(eventArgs.SourceViewModel as IDockableViewModel); this.ActiveViewModel = eventArgs.SourceViewModel as BaseDockingViewModel; if (this.ActiveViewModel.IsActiveView != true) { this.ActiveViewModel.IsActiveView = true; } } else { //System.Windows.MessageBox.Show("Deactivated view is: " + eventArgs.SourceViewModel); } }
private void OnActiveViewChanged(object sender, ActiveViewChangedEventArgs e) { ((ActiveDocumentView)View.CurrentObject).Name = "inactive"; ObjectSpace.CommitChanges(); if (e.View != null) { ((ActiveDocumentView)e.View.CurrentObject).Name = "active"; } }
private void OnActiveViewChanged(object sender, ActiveViewChangedEventArgs e) { _activeDocumentView = e.View; }
/// <summary> /// Called whenver a subview becomes active. This is used to track what subview is currently active. /// </summary> /// <param name="eventArgs"></param> protected abstract void ReactOnViewActivation(ActiveViewChangedEventArgs eventArgs);