Why are my floating windows not resizing?

Docking/MDI for WPF Forum

Posted 14 years ago by Adam Petaccia
Version: 10.2.0531
I have some code which looks like the following:
tw = new ToolWindow ()
                Name = "w_ToolWindow",
                Title = "A tool window",
mainDockSite.ToolWindows.Add (tw);
tw.Content = new TextBlock (new Run (string.Concat ("Dynamic Content!\n", DateTime.Now)));
tw.Float ();
DockSite.SetControlSize (tw.ParentContainer, new Size (480, 240));
But the control still comes up at the default size. What needs to be done in order to size a floating toolwindow?

Comments (2)

Posted 14 years ago by Adam Petaccia
I don't know how I missed Float taking a Size as an argument, so I will use that.

But for future reference, how should SetControlSize be used here?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Adam,

The ControlSize would be used inside the Float method. So if you set it after you call Float, then it would have no effect.

Before you call the Float method, the ParentContainer property will most likely be null. So you would need to set the control size of the ToolWindow.

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.