Click here to Skip to main content
16,020,162 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: TextBox Bound To Decimal - Can't Type Decimal Pin
Eddy Vluggen9-Feb-22 2:40
professionalEddy Vluggen9-Feb-22 2:40 
GeneralRe: TextBox Bound To Decimal - Can't Type Decimal Pin
Super Lloyd9-Feb-22 12:10
Super Lloyd9-Feb-22 12:10 
GeneralRe: TextBox Bound To Decimal - Can't Type Decimal Pin
Eddy Vluggen9-Feb-22 12:13
professionalEddy Vluggen9-Feb-22 12:13 
AnswerRe: TextBox Bound To Decimal - Can't Type Decimal Pin
Richard Deeming4-Jan-22 0:04
mveRichard Deeming4-Jan-22 0:04 
QuestionSetting DataGrid Cell Style From Code Behind Pin
Kevin Marois20-Dec-21 10:56
professionalKevin Marois20-Dec-21 10:56 
AnswerRe: Setting DataGrid Cell Style From Code Behind Pin
#realJSOP22-Dec-21 2:06
professional#realJSOP22-Dec-21 2:06 
QuestionInput Question Pin
Super Lloyd19-Dec-21 4:17
Super Lloyd19-Dec-21 4:17 
AnswerRe: Input Question Pin
#realJSOP19-Dec-21 22:26
professional#realJSOP19-Dec-21 22:26 
GeneralRe: Input Question Pin
Super Lloyd19-Dec-21 23:05
Super Lloyd19-Dec-21 23:05 
GeneralRe: Input Question Pin
#realJSOP19-Dec-21 23:18
professional#realJSOP19-Dec-21 23:18 
GeneralRe: Input Question Pin
Super Lloyd19-Dec-21 23:23
Super Lloyd19-Dec-21 23:23 
Question(Advanced?) Layout question Pin
Super Lloyd17-Dec-21 20:02
Super Lloyd17-Dec-21 20:02 
QuestionAbout RichTextBox size in a canvas Pin
Super Lloyd12-Dec-21 1:23
Super Lloyd12-Dec-21 1:23 
AnswerRe: About RichTextBox size in a canvas Pin
Richard Deeming12-Dec-21 21:49
mveRichard Deeming12-Dec-21 21:49 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd12-Dec-21 21:58
Super Lloyd12-Dec-21 21:58 
AnswerRe: About RichTextBox size in a canvas Pin
Gerry Schmitz13-Dec-21 7:22
mveGerry Schmitz13-Dec-21 7:22 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd13-Dec-21 11:42
Super Lloyd13-Dec-21 11:42 
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
professional#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.

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.