Text wrapping in textbox contained in Rafting Window

Docking/MDI for WPF Forum

Posted 6 years ago by Moondance
Version: 13.2.0590
Avatar

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"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

ResizeMode="CanResizeWithGrip"

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

<Grid>

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

</Grid>

</

Window>

 

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

window.Float((

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 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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 (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.