Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am wanting to increase the character spacing of a TextBlock or Label in WPF. This is NOT UWP.

What I have tried:

I have seen example code stating to use Glyphs. I dont like this method because you have to onow the actual font path, which is required by the Glyph object.
Posted

1 solution

 
Share this answer
 
Comments
CoderzF1 19-Feb-24 4:11am    
I have actually tried the marked solution from that post. Really all that is doing is adding multiple TextBlocks with a right-margin set. It may be the way I have to go, even though I don't like it. I can even use the Glyphs object, however, I would have to package a font with the application due to the only way to set the font for Glyphs is to supply the Font Uri. I don't know why Microsoft didn't supply an easier way to do this. UWP has an attribute for TextBlock to set Character Spacing but not Standard WPF.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900