private void CloseAndReturnSelection(object sender, RoutedEventArgs e) { e.Handled = true; SelectedItem = GetSelected(); _searcher.CancelSearch(); Close(); }