private void SearchTextChangedHandler(object sender, TextChangedEventArgs args) { var searchedWords = TextSearchHelper.GetSearchedWords(SearchPhraseTextBox.Text); _collectionView.Filter = searchedWords.Length == 0 ? (Predicate <object>)null : e => { var entry = (StatementExecutionHistoryEntry)e; var textToSearch = $"{entry.StatementText.ToUpperInvariant()} {CellValueConverter.FormatDateTime(entry.ExecutedAt).ToUpperInvariant()} {entry.Tags?.ToUpperInvariant()}"; return(searchedWords.All(textToSearch.Contains)); }; ListHistoryEntries.UpdateLayout(); HighlightText(searchedWords); }
private void HistoryViewScrollChangedHandler(object sender, ScrollChangedEventArgs args) { HighlightText(TextSearchHelper.GetSearchedWords(SearchPhraseTextBox.Text)); }