private void ShowAdvancedSearchWindow() { if (searchWindow == null || !searchWindow.IsVisible) { searchWindow = new SearchWindow(); } searchWindow.Show(); searchWindow.Activate(); searchWindow.Focus(); }
private void openSearchWindow(object sender, EventArgs args) { SearchWindow window = new SearchWindow(); window.DataContext = swViewModel; WindowInteropHelper helper = new WindowInteropHelper(window); ElementHost.EnableModelessKeyboardInterop(window); window.Show(); window.Activate(); window.Deactivated += closeSearchWindow; }