/* public void FindText(DependencyObject searchIn, string searchText) * { * FindText(searchIn, searchText, false); * } */ public virtual void ResetHighlights() { if (highlightHandlers != null) { highlightHandlers.Reset(); } else { highlightHandlers = new HighlightHandlers(this); } }
// Query searchText; /* * /// <summary> * /// Gets an enumerator * /// </summary> * public IEnumerator<Highlight> GetHighlightEnumerator() * { * * foreach (HighlightHandler handler in highlightHandlers) * { * foreach (Highlight highlight in handler.Highlights) * { * yield return highlight; * } * } * } */ /// <summary> /// Removes highlights and resets the highlight iterator. /// </summary> public virtual void ResetHighlights() { CurrentMatch = null; if (highlightHandlers != null) { highlightHandlers.Reset(); } else { highlightHandlers = new HighlightHandlers(this); highlightHandlers.NewSearchNeeded += highlightHandlers_NewSearchNeeded; } }