I have a TextBlock
object with a bound Text
property.
I cannot control the binding source, but I can change Binding
and TextBlock
.
I want to format some key word display style...
For example:
I want to formart word "key" to bold, and formart word "RED" to red color,
And source data is "Example keyword and RED word".
After formatting, the equivalent Xaml should be
Example <Bold>key</Bold>word and <Span Foreground="Red">RED</Span> word
Of course, if the source was changed, Text must also changing synchronously.
What should I do?