private void BtnDoSearch_Click(object sender, RoutedEventArgs e) { if (this.Text != String.Empty) { DoSearch?.Invoke(this, this.Text); } }
private void TextBox_PreviewKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (this.Text != String.Empty) { DoSearch?.Invoke(this, this.Text); } } }
private void SearchBox_DoSearch(SearchBox sender, string searchText) { DoSearch?.Invoke(sender, searchText); sender.Text = ""; cbRangeType.SelectedIndex = 0; }