How to change character spacing in XAML in a textb

2020-02-07 01:03发布

How do I change the character spacing in a WPF application within a textblock. Also known as kerning or tracking for characters.

2条回答
趁早两清
2楼-- · 2020-02-07 01:45

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

查看更多
ゆ 、 Hurt°
3楼-- · 2020-02-07 01:54

An answer on social.msdn suggests the use of Glyphs.

Other than that FontStretch allows for some adjustment.

查看更多
登录 后发表回答