|Interesting mix of WPF and Windows Forms! And on point answer!
I studied your code a bit but then I realized one possible problem. It might not work if there are multiple Font in used on the longest line, like Courier 64 and Courier 12. Which is the point of a
RichTextBox after all.
Which bring me back to just working with plain old
TextBox. I can give them a custom Font too, and bold and italic and etc..., just a single font (or other properties) for the whole text.
RichTextBox is not really hiding the possible width of the rich text (which would be "easy" to circumvent), it's not calculating it, and there doesn't seem to be any easy way to measure a
FlowDocument that I could find...
Unless, could there be an easy way to convert
FormattedText? Mmm... perhaps I should google that...
As to the "too much text" issue, it's not my problem, it's the user problem. Worst case scenario they can use a few line return.
The view has builtin zoom and scroll, so that help too.
Additionally I'd like to keep the text centered on the target square as the text is entered / updated (though it could be dragged with the appropriate tool later)
I need to move on with (for now) plain text. And on a much later day I might spend some.. weeks making a custom text editor.. haha
modified 14-Dec-21 7:44am.