c# - highlighting text in listview from linq query -
windows 10 universal app
hi, highlight text in listview
linq. i´ve listview
, listviewitemtemplate
, datatemplate
, textbox
. textbox
binding.
<listview x:name="listview" background="#ffccd0d6" margin="0,240,0,60" isitemclickenabled="true" horizontalalignment="right" width="1095" scrollviewer.horizontalscrollbarvisibility="auto" tapped="listview_tapped" doubletapped="listview_doubletapped" selectionchanged="listview_selectionchanged"> <listview.itemtemplate> <datatemplate> <stackpanel orientation="horizontal"> <textblock margin="4" text="{binding vorname}" horizontalalignment="left"/> <textblock margin="4" text="{binding nachname}" horizontalalignment="left"/>
i search linq text textbox. works fine. items searched. know, how highlighted searched text. can´t find solution.
thanks help
olli
you wont easy, had once requirement client , ended stripping textblock in 5 <run>
properties cover possible situation, hard part process results , split strings accordingly:
<textblock textwrapping="wrap"> <bold><run text="{binding text1}" /></bold> <run text="{binding text2}" /> <bold><run text="{binding text3}" /></bold> <run text="{binding text4}" /> <bold><run text="{binding text5}" /></bold> </textblock>
edit:
there library claim task, have never played can give try: htmltextblock wpf
Comments
Post a Comment