enzhou.liu
enzhou.liu

Reputation: 183

How to align the text in textbox, seems different character has different width

For multiline TextBox in wpf, i find the length of the chars of the text is not always equal. For instance, if i put kkk in the first line, "f f" in the 2nd line, they wont align...since f and space take smaller size.

How to stop that and make every char has the same size??

So that my strings can be align?

Upvotes: 1

Views: 552

Answers (1)

We Are All Monica
We Are All Monica

Reputation: 13336

Set the font to Courier New or another monospace font.

Upvotes: 3

Related Questions