Possible to add a Dockmanager to a TabPage?

Hey Syncfusion Community ;-)

I am trying to add a DockManager control to a TabPage. Unfortunately, I am failing miserably to find a function that tells the DockManager what its parent should be.

Is there a function that can do this?

1 Reply 1 reply marked as answer

BR Bharathi Rajakantham Syncfusion Team March 16, 2021 01:00 PM UTC

Hi Pac, 
 
Thanks for contacting Syncfusion Support. 
 
We have checked the reported query “Is it possible to add docking manager to TabPage” from our end. We don’t have direct support to achieve this requirement. But we can achieve this requirement by adding custom container control and assigning to the DockingManager.HostControl. We have prepared the sample for the same. In this sample we have added custom container class(DockingContainerControl) to host the DockingManager children. Drag and drop the TabControlAdv and added two child(TabPageAdv1, tabPageAdv2) then added DockingContainerControl as child of TabPageAdv1. Drag and drop the DockingManager control inside to the DockingContainerControl and then assign the DockingContainerControl to DockingManager.HostControl property then add panel as child for DockingContainerControl in code behind and set DockingManager.SetEnbaleDocking as true for that panel. Please find the sample and code snippet below for reference. 
 
Code Snippet: 
 
dockingManager1.HostControl = this.dockingContainerControl1; 
Panel panel = new Panel(); 
panel.Name = "Panel1"; 
this.dockingContainerControl1.Controls.Add(panel); 
dockingManager1.SetEnableDocking(panel, true); 
 
 
Please let us know if you need any further assistance on this. we will be glad to assist you. 
 
Regards, 
Bharathi R 


Marked as answer
Loader.
Up arrow icon