This is a migrated thread and some comments may be shown as answers.

Auto Width

1 Answer 81 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 25 Aug 2010, 07:09 PM
If I set my RichTextBox width to "Auto" the width ends up being "134217728".  I think this is because "134217728" represents the max width anything can be and the MaxWidth property of the RichTextBox is set to "Infinity."  All of the RichTextBox's parent containers are also set to "Auto."  How can I have my RichTextBox stretch to the full length of its parent container when all parent containers are set to Auto?

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 26 Aug 2010, 12:47 PM
Hi Travis,

Currently RadRichTextBox does not support Auto Width when placed in Stack panel or other panel that measures its child controls with infinity in width. This is in result of the way RadRichTextBox measures its content - it needs information about the width of the view to determine the line breaks.

In your case you should either specify width or RadRichTextBox or place RadRichTextBox it in a grid with column width/row height set to "*". I have prepared you a demo than shows various layout configurations with Stack and Grid panels and RadRichTextBox.

All the best,
Mike
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Travis
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or