开发者

How to change the color of some text in textbox - Silverlight 3?

开发者 https://www.devze.com 2022-12-10 02:43 出处:网络
I have a usual TextBox. I know in order to change the color of some text I can use Run tag. But when I try to use it imperatively instead declaratively (because I need to do that dynamically) I have t

I have a usual TextBox. I know in order to change the color of some text I can use Run tag. But when I try to use it imperatively instead declaratively (because I need to do that dynamically) I have the text in TextBox like

AAA<Run...>Text to be changed in color</Run>

and sure nothing in c开发者_高级运维olor changes. How can I change the color of some text in some program way? Thanks


I'm fairly sure you have to use a RichTextBox for that, TextBox only works with plaintext.

0

精彩评论

暂无评论...
验证码 换一张
取 消