Click here to Skip to main content
16,016,605 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 
I am having a RichTextBox in a Canvas, or perhaps it should be an Adorner.
The thing is, this RichTextBox has no witdh (min,max, current, whatever) set nor has any hint about which width to use, like so:
XML
<Canvas>
    <RichTextBox Canvas.Top="50" Canvas.Left="80">
</Canvas>

I was hoping it would auto resize when text is edited. But the thing is, the width is set to and doesn't update. And It ends-up wordwrapping on every letter like so!
W
o
r
d

Hence I am currently investigating.. how to make a WPF RichTextBox auto size! And would appreciate any help! Smile | :)

EDIT7
I am aware this goes against the design and implementation of RichTextBox, and also some people seem obsessed with my use of Canvas in the example above.
At any rate I gave up for now, but I asked here in just in case there is a work around solution somewhere on the internet that any one knows about?

Meanwhile, to temper the obsessive questioning about why I used a Canvas (not really but it's a good approximation) or why I "need resizable text" here is my use case.

Forget about LOB applications. Imagine there is a (zoomable, scrollable, pannable, rotatable) drawing area.

Now when the user click somewhere multiple things could happen (like, say, drawing a bezier curve), one of them is adding some text centered around said point. Which start by typing said text centered at point inline, ie. wysiwig editing. With the box around the text, previewing textblock handles, for later manipulation, such as rotation or translation (as in displacement)
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 15-Dec-21 7:43am.

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 

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.