public void ShowSwitchToDialog() { if (!SwitchToDialog.IsInUse) { FocusManager.SetFocusedElement((DependencyObject)this.applicationWindow, (IInputElement)this.applicationWindow); new SwitchToDialog((IWindowService)this, this.viewService).ShowDialog(); } else { SwitchToDialog.FocusCurrentInstance(); } }
protected override void OnClosed(EventArgs e) { if (!this.cancel) { DocumentViewReference documentViewReference = (DocumentViewReference)this.documentViewReferencesView.CurrentItem; if (documentViewReference != null) { this.viewService.ActiveView = (IView)documentViewReference.DocumentView; } } this.windowService.ReturnFocus(); SwitchToDialog.currentlyActiveDialog = (SwitchToDialog)null; base.OnClosed(e); }
protected override void OnInitialized(EventArgs e) { SwitchToDialog.currentlyActiveDialog = this; base.OnInitialized(e); }