c# - Change color in part of text in textblock -
i need change color in code behind part of text string..
my exaple:
textblock1.text = string1 + string2 + string3;
string have dynamic values, , want string2 display after running program in blue color , must defined in code behind.
its possible? thank you!
that working
textblock1.inlines.clear(); textblock1.inlines.add(new run(string1)); textblock1.inlines.add(new run(string2) { foreground = brushes.blue });
Comments
Post a Comment