Text wrapping in textbox contained in Rafting Window

Docking/MDI for WPF Forum

Posted 11 years ago by Moondance
Version: 13.2.0590

I have a ToolWindow. It countains a UserControl which then contains a Textbox. I want the text to wrap in the textbox but I do not want to set the width of the textbox. The textbox should stretch and shrink when user resize the toolwindow.

I was able to havethis functionality easily using a WPF window:

<Window x:Class="WpfApplication2.MainWindow"




Title="MainWindow" Height="350" Width="525">


<TextBox Name="textBox1" VerticalAlignment="Top" TextWrapping="Wrap" HorizontalAlignment="Stretch" />





But I cannot get the same functionality with a tool window. I tried:


Size) arg);

var baseWindow = Window.GetWindow(window);

if (baseWindow != null)


baseWindow.ResizeMode = ResizeMode.CanResizeWithGrip;


But that did not help at all.

Is there a way?

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA

Hello, when you have a tool window, whatever its content is will resize to the available space in the tool window container.  And the rafting window the tool window gets placed in (when floating) will be resizable.  So I'm not quite sure what the problem is that you are seeing.  Perhaps you could describe the exact problem in more detail.  Thanks!

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.