How to paint notebook-like lines as TextBox backgr

2019-09-06 14:15发布

问题:

A bit similar to this question.

My aim is to evocate a notebook-like look of the textbox.

OneNote does something similar, by setting background image of the editing surface. Of course it is not possible to align the lines in OneNote because the text can be freely formatted.

I would like to do this with constant font (no formatting) in WPF. How to paint lines in textbox background that will match the lines of text?

回答1:

I asked the same question here: Repeat a background brush in WPF

It would be easy to convert to a TextBox.

Best of luck!