wpf - How can I display multiple colored underlined Text in a Textbox -


this code underlines text in textbox, can underline specific text?

brush brush = brushes.blue;              pen pen = new pen(brush,2);              textbox tb1 = new textbox();             tb1.acceptsreturn = true;              tb1.text = "this long text not?";                          textdecoration textdec = new textdecoration(textdecorationlocation.underline,pen,1,textdecorationunit.pixel,textdecorationunit.fontrecommended);              tb1.textdecorations.add(textdec);              tb1.width = 400;             tb1.height = 30;             this.addchild(tb1); 

the textbox doesn't provide ability alter characteristics individual characters. it's or none control.

the richtextbox control need.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -