How do I change the character spacing in a WPF application within a textblock. Also known as kerning or tracking for characters.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
An answer on social.msdn suggests the use of Glyphs
.
Other than that FontStretch
allows for some adjustment.
回答2:
Maybe you can add a Behavior for that TextBox that would go over every character and add a space after it.
Alternatively, If you're using DataBinding, use a Converter with the same logic.
And if you want to go for an overkill, you can make a custom control, that will inherit from TextBox and implement that spacing logic That would also allow you to add a Dependency Property, something like "NumOfSpaces" and you could control how many spaces it would put