I'm using RadDock 2017.2.502.40.
When I drag a toolwindow, that is initially docked, it becomes a floating window. I am unable to resize the floating window.
Unfortunately, it seems, that by default the floating window cannot be resized. I've created a fresh form with a RadDock so this behavior is right out of the box.
I've handled the FloatingWindowCreated event and set the FormBorderStyle per this post:
http://docs.telerik.com/devtools/winforms/dock/object-model/customizing-floating-windows
But it seems to have no effect. The floating window still cannot be resized. I know the code is running because I've put in breakpoints. The FormBorderStyle does change.
Just to make sure that something works, I've tried e.Window.Controls.Clear() and all the controls are gone when the floating window displays. But it's not resizeable.
How do I make a floating tool window resizeable.
Thanks,
Steve
11 Answers, 1 is accepted

It appears that settings are getting applied to the Floating Window only AFTER the FloatingWindowCreated event:
In the designer I've specified the DefaultFloatingSize to be 700x700. See image.
But when I put a break point in the handler for the FloatingWindowCreated event and check the size of the window it is the default 300x300 still.
Yet...when the Floating Window finally opens it is 700x700.
What does this mean? It seems to me that the DefaultFloatingSize is being applied AFTER the FloatingWindowCreated event. Are all the other default settings being applied AFTER that event as well?
Whatever properties I try to set in the FloatingWindowCreated event, it seems they are overwritten after that.
This is an issue which was introduced in the latest version of the suite (works in previous versions). I have logged the issue in our Feedback Portal. I have added a vote for it on your behalf as well. You can track its progress, subscribe for status changes and add your comment to it here. I have also updated your Telerik Points.
To workaround this you can create a custom floating window:
class
MyWindow : FloatingWindow
{
public
MyWindow(RadDock dock):
base
(dock)
{
}
protected
override
CreateParams CreateParams
{
get
{
CreateParams cp =
base
.CreateParams;
cp.Style &= NativeMethods.WS_THICKFRAME;
return
cp;
}
}
}
The FloatingWindowCreated event allows you to change the window:
private
void
RadDock1_FloatingWindowCreated(
object
sender, Telerik.WinControls.UI.Docking.FloatingWindowEventArgs e)
{
e.Window =
new
MyWindow(radDock1);
e.Window.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
}
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik by Progress

Thank you. That fixed the resizing problem, but exposed another one. I can resize the floating window now, but there are painting issues. When the floating window is first displayed after being undocked, child controls are not visible. After something triggers a paint event like moving or resizing, the children are drawn. However, when the parent form gets focus, the child controls disappear again.
So, essentially, while the floating window is now resizeable, it's unusable in that mode.
I suspect this issue is an extension of the last, but if you have another work around that would be great.


The mistake is mine. You should change the following line:
cp.Style |= NativeMethods.WS_THICKFRAME;
When this is resolved the behavior will be exactly as it was before and you will not have to change anything in your existing applications.
Do not hesitate to contact us if you have other questions.
Regards,
Dimitar
Telerik by Progress


Hi all,
the same issue will appear using custom controls for docking.
We also need a fix for that immediately.
Thank you for writing.
Can you please provide me with more details about your actual setup. Is the workaround applicable in your project? The fastest way to investigate would be to open up a support ticket and attaching your project.
I hope this helps. Looking forward to your reply.
Regards,
Hristo
Progress Telerik

Hi Hristo,
i have setup a project where you can check the mall function.
I'm using VS 2017 and Telerik 2017.2.502.40
Regards,
Hardy
We can continue discussing your case in the support ticket.
Regards,
Dimitar
Progress Telerik