programatically highlight words using c#:

programatically highlight words using c#: Your output like this.... xaml: create a text block with name of tb. < TextBlock Height =" auto " TextWrapping =" Wrap " Width =" 200 " HorizontalAlignment =" Left " Margin ="45,12,0,0" Name =" tb " Text =" Textblock " VerticalAlignment =" Top " /> c# code: string source = " This is a example of Highlight a word using c# "; //Your source string [] highlight_words = { " example ", " word " }; //Your Key word On your button click event call this function like this private void button1_Click( object sender, RoutedEventArgs e) ...