I am using WPF to show complex data (think reporting). I now need to have a fulltext search for it. We currently do this by walking the visual tree looking for textblocks. It seems that this needs to be done on the UI thread, is that right? The problem here is that it might take quite a while until the next match is found during wich the whole UI blocks.
Is there a way to circumvent this problem? I could try to use UI Automation but once I found a match how do I highlight it? Using UI Automation I do not get references to the actual object instance of the UI Element, hence I can not put an adorner on top of it.
How is fulltext search in WPF usually implemented? How does the XPS viewer do it?