I have a text block whose text is generated by a converter from a bound object. I am trying to have only part of the text in a different font than the rest. Is this possible in Silverlight/WPF?
How would I go about generating code to produce this effect?
Example Text:
-Hello, this is some text- “More text”
Where any text in — is one font, and “” denotes another font.
I looked into inline runs, but that did not seem feasible with code behind.
Can anyone point me in the right direction?
Thanks,
Ty
You’re correct to do Inlines
One possible other solution if you already know what the text will be (you know that there will be two portions of text) is to have some pre-canned xaml ready to go and use the XamlReader.Parse method