Click here to Skip to main content
15,498,797 members
Home / Discussions / WPF
   

WPF

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