Can I have multiple colors in a single TextBlock in WPF?

Posted by Siracuse on Stack Overflow See other posts from Stack Overflow or by Siracuse
Published on 2010-04-24T17:28:02Z Indexed on 2010/04/24 17:33 UTC
Read the original article Hit count: 301

Filed under:
|
|

I have a line of text in a textblock that reads:

"Detected [gesture] with an accuracy of [accuracy]"

In WPF, is it possible for me to be able to change the color of the elements within a textblock? Can I have a textblock be multiple colors? For example, I would like the whole TextBlock to be black except the gesture name, which I would like to be red.

Is this possible in WPF?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#