Hi all,
I would like to resize a dock control in runtime, no by drag&drop splitter but the clicking on the icon (size up/down).In the beginning, the dock control is docking to the bottom as 1/3 of the main form height.
I am able to get the information of ChildControllers, DICurrent.rcDockArea, etc. but it isn't enough.
The visible changes appeared when I call the SetBounds method.
if (dockHost.InternalController is DockHostController dhc)
{
var moveAbout = 50;
foreach (var child in dhc.ParentController.ChildControllers)
{
if (child is DragSplitterController dsc)
{
var r = dsc.HostControl.Bounds;
dsc.HostControl.SetBounds(r.X, r.Y + moveAbout, r.Width, r.Height);
}
else if (child is DockHostController dhc2)
{
var r = dhc2.HostControl.Bounds;
dhc2.HostControl.SetBounds(r.X, r.Y + moveAbout, r.Width, r.Height - moveAbout);
}
}
}
This solution has side effects, the original line of splitter stayed visible (see attached DockingSideEffect.zip).
Any tips?
Thanks.
Kind regards,
Kamil
Attachment:
DockingSideEffect_7004afd2.zip