Click here to Skip to main content
15,867,870 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: About RichTextBox size in a canvas Pin
Gerry Schmitz13-Dec-21 14:28
mveGerry Schmitz13-Dec-21 14:28 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd13-Dec-21 14:40
Super Lloyd13-Dec-21 14:40 
GeneralRe: About RichTextBox size in a canvas Pin
Gerry Schmitz14-Dec-21 7:28
mveGerry Schmitz14-Dec-21 7:28 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd14-Dec-21 12:28
Super Lloyd14-Dec-21 12:28 
AnswerRe: About RichTextBox size in a canvas Pin
Mycroft Holmes13-Dec-21 13:16
professionalMycroft Holmes13-Dec-21 13:16 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd13-Dec-21 13:27
Super Lloyd13-Dec-21 13:27 
AnswerRe: About RichTextBox size in a canvas Pin
#realJSOP14-Dec-21 0:37
mve#realJSOP14-Dec-21 0:37 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd14-Dec-21 0:52
Super Lloyd14-Dec-21 0:52 
Interesting mix of WPF and Windows Forms! And on point answer! Smile | :)

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.

The 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 FlowDocument to 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
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 14-Dec-21 7:44am.

GeneralRe: About RichTextBox size in a canvas Pin
#realJSOP14-Dec-21 8:42
mve#realJSOP14-Dec-21 8:42 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd14-Dec-21 12:26
Super Lloyd14-Dec-21 12:26 
GeneralRe: About RichTextBox size in a canvas Pin
#realJSOP14-Dec-21 23:49
mve#realJSOP14-Dec-21 23:49 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd15-Dec-21 0:02
Super Lloyd15-Dec-21 0:02 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd15-Dec-21 0:24
Super Lloyd15-Dec-21 0:24 
GeneralRe: About RichTextBox size in a canvas Pin
#realJSOP16-Dec-21 2:42
mve#realJSOP16-Dec-21 2:42 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd16-Dec-21 2:55
Super Lloyd16-Dec-21 2:55 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd14-Dec-21 2:10
Super Lloyd14-Dec-21 2:10 
QuestionWPF Converter Set or Library Pin
michaelbarb10-Dec-21 9:35
michaelbarb10-Dec-21 9:35 
AnswerRe: WPF Converter Set or Library Pin
Gerry Schmitz10-Dec-21 10:04
mveGerry Schmitz10-Dec-21 10:04 
GeneralRe: WPF Converter Set or Library Pin
michaelbarb10-Dec-21 11:14
michaelbarb10-Dec-21 11:14 
GeneralRe: WPF Converter Set or Library Pin
Gerry Schmitz11-Dec-21 5:51
mveGerry Schmitz11-Dec-21 5:51 
GeneralRe: WPF Converter Set or Library Pin
michaelbarb11-Dec-21 13:25
michaelbarb11-Dec-21 13:25 
GeneralRe: WPF Converter Set or Library Pin
Gerry Schmitz13-Dec-21 7:26
mveGerry Schmitz13-Dec-21 7:26 
GeneralRe: WPF Converter Set or Library Pin
michaelbarb13-Dec-21 14:44
michaelbarb13-Dec-21 14:44 
AnswerRe: WPF Converter Set or Library Pin
RedDk11-Dec-21 8:29
RedDk11-Dec-21 8:29 
GeneralRe: WPF Converter Set or Library Pin
michaelbarb11-Dec-21 13:04
michaelbarb11-Dec-21 13:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.