How to display search results in a WPF items control with highlighted query terms

后端 未结 3 616
天涯浪人
天涯浪人 2020-12-03 16:06

I\'d like to display search results within a WPF ItemsControl with the query terms highlighted.

The search engine I use, Lucene.Net with the Highlighter plugin, retu

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 16:25

    A TextBlock can contain multiple Runs in its Inlines collection. You can build it in code or in XAML:

    
        ... these 
        results
         were found...
    
    

提交回复
热议问题