void ExecuteFind(object sender, ExecutedRoutedEventArgs e) { panel.Open(false); if (!(TextArea.Selection.IsEmpty || TextArea.Selection.IsMultiline)) { panel.SearchPattern = TextArea.Selection.GetText(); } Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Input, (Action) delegate { panel.Reactivate(); }); }
public void Open() { panel.Open(); panel.SearchPattern = TextArea.Selection.GetText(); Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Input, (Action) delegate { panel.Reactivate(); }); }
void ExecuteFind(object sender, ExecutedRoutedEventArgs e) { panel.Open(); panel.SearchPattern = TextArea.Selection.GetText(); Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Input, (Action) delegate { panel.Reactivate(); }); }