Page 1 of 1

RichText.SetText()

Posted: 06 Dec 2024, 20:49
by stonstad
I'm trying to use the RichText extension in code. Could you please advise of the correct approach and/or update the documentation?

https://www.noesisengine.com/docs/App.A ... hText.html
TextBlock a = new TextBlock();
RichText.SetText(a, "[b]Hello[/b] World");
Thank you!

Re: RichText.SetText()

Posted: 09 Dec 2024, 18:21
by stonstad
Should this be working, or is there no programmatic API surface area?

Thanks,
Shaun

Re: RichText.SetText()

Posted: 10 Dec 2024, 17:00
by jsantos
Your code appears to be correct. Could you confirm if the font you’re using includes glyphs for bold?

Re: RichText.SetText()

Posted: 14 Dec 2024, 16:33
by stonstad
This seems like user error on my part. If I have two fonts that specify the same font family, but different weight, is Noesis able to switch between them when bold font weight is selected?

Image

Image

Re: RichText.SetText()

Posted: 16 Dec 2024, 11:47
by sfernandez
Yes, it should, you can try it in a simple TextBlock without using RichText to verify it.