Click here to Skip to main content
15,513,571 members
Home / Discussions / WPF
   

WPF

 
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
Super 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
Super 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
Super Lloyd20-Dec-21 0:23 
Question(Advanced?) Layout question Pin
Super Lloyd17-Dec-21 21:02
Super Lloyd17-Dec-21 21:02 
QuestionAbout RichTextBox size in a canvas Pin
Super Lloyd12-Dec-21 2:23
Super Lloyd12-Dec-21 2: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 22:49
mveRichard Deeming12-Dec-21 22:49 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd12-Dec-21 22:58
Super 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
Super 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
Super 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
Super 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
Super 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
Super Lloyd14-Dec-21 1:52 
GeneralRe: About RichTextBox size in a canvas Pin
#realJSOP14-Dec-21 9:42
mva#realJSOP14-Dec-21 9:42 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd14-Dec-21 13:26
Super Lloyd14-Dec-21 13:26 
GeneralRe: About RichTextBox size in a canvas Pin
#realJSOP15-Dec-21 0:49
mva#realJSOP15-Dec-21 0:49 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd15-Dec-21 1:02
Super Lloyd15-Dec-21 1:02 
GeneralRe: About RichTextBox size in a canvas Pin
Super Lloyd15-Dec-21 1:24
Super Lloyd15-Dec-21 1:24 

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.