Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Top dock a panel using ultradockmanager below fixed panel at top
posted

Hi,

I am migrating a WinForm application which uses SyncFusion docking manager to use Infragistics docking manager. In the SyncFusion version of the application, the host form has a fixed panel at the top of the form. Rest of the panels are docked on four sides, with a non-docking center panel.

My problem is that when I try to manage same layout with Infragistics docking manager, it places the top-docking panel (via UltraDockManager) at the very top, pushing the non-docking(fixed) top panel below it.

I could not find any way around this problem. Because of the way the older version of the app is designed, it is also not feasible to alter the container hierarchy of panels.(use a separate container control to host the DockManager)

I have tried to reproduce the issue in the following snippet. I need to dock the panelTop below the panelHeader. Because of the current code constraints, I cannot dock the panelHeader using the UltraDockManager.

SuspendLayout();

            Panel panelTop = new Panel();
            Panel panelHeader = new Panel();            
            
            panelTop.BackColor = System.Drawing.Color.Blue;
            panelHeader.BackColor = System.Drawing.Color.Red;

            panelHeader.Size = new Size(100, 50);
            panelHeader.Dock = DockStyle.Top;     

            UltraDockManager dockmanager = new UltraDockManager();
            dockmanager.HostControl = this;      

           DockableControlPane dcpTop = new DockableControlPane(panelTop);
           DockAreaPane dapTop = new DockAreaPane(DockedLocation.DockedTop);      

           dapTop.Panes.Add(dcpTop);   
           dockmanager.DockAreas.Add(dapTop);
           
           this.Controls.Add(panelHeader);   
 
        	ResumeLayout();

Please advise if there is a way around the same.

Thanks and Regards,

Prerna

  • 34430
    Offline posted

    Hello Prerna,

    I have been investigating into the behavior you are looking to achieve, and in order to do this without changing your hierarchy of panels, I would recommend utilization of the OuterDockPanel element. This element is a Panel that Infragistics exposes that implements the IDockingArea interface and works with our docking manager to find all controls and give the OuterDockPanel a higher priority so that it is placed “outside” of the dock manager.

    As an example, if in the code-sample that you provided you changed the “panelHeader” Panel to be an OuterDockPanel, it would then appear outside of the dock manager.

    I hope this helps. Please let me know if you have any other questions or concerns on this matter.