/// <summary> /// React on CloseViewModelRequestEvent. /// </summary> /// <param name="args">Event data.</param> public virtual void CloseViewModel(CloseViewModelRequestEventArgs args) { if (args.SourceViewModel is IDockableViewModel) { if (!args.ShouldRemoveVM) { this.LayoutManager.CloseWindow(args.SourceViewModel as IDockableViewModel); (args.SourceViewModel as IDockableViewModel).IsDockingPaneVisible = false; } else this.LayoutManager.CloseWindow(args.SourceViewModel as IDockableViewModel, true); } }
/// <summary> /// React on CloseViewModelRequestEvent. /// </summary> /// <param name="args">Event data.</param> protected override void CloseViewModel(CloseViewModelRequestEventArgs args) { if (this.PackageController == null) return; if (this.PackageController.CurrentShellViewModel != this) return; this.PackageController.CloseViewModel(args); }