Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change TextOptions of FormattedText in c# using WPF?

Tags:

c#

wpf

I want to draw a FormattedText with different rendering options. When we create for example a Label we can set its TextOptions.TextFormattingMode(Ideal/Display) and TextOptions.TextHintingMode(Auto/AntiAliasing/ClearType/Grey Scale).

I want to set hinting mode and formatting mode on my FormattedText. I think TextFormattingMode can be passed as a constructor argument but what about TextHintingMode? Is it possible to set it?

like image 520
Kuczi Avatar asked Jan 18 '26 04:01

Kuczi


1 Answers

Both TextRenderingMode and TextHintingMode can only be set at the Visual level. So no, you won't be able to apply it to a specific FormattedText, only the entire control it's rendered in.

like image 159
Eli Arbel Avatar answered Jan 20 '26 18:01

Eli Arbel