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
9364
Unpinned control does not start out unpinned
posted

I want my application to start with certain controls unpinned. I am unpinning using this following code 

            ultraDockManager1.DockControls((Control[])mycontrols,DockedLocation.DockedBottom, ChildPaneStyle.TabGroup);

            ultraDockManager1.DockAreas[1].Unpin(); 

 

 

Questions:

1.   The  behavior I get is that  the control shows as the application instantiates but  then the control flies back into the autohide mode. In other words, it does not start out in the autohide mode when the application instantiates. Am I am doing the Unpin() too late?   

2. Is there a way refer to the DockArea using the name of the control in it or some other way. I do not want to use the integer index for access the DockArea 

  • 5389
    Suggested Answer
    posted

    vrn,

    1. Try surrounding your code with calls to UltraDockManager1.SuspendLayout() and UltraDockManager1.ResumeLayout().  This will prevent the component's layout manager from sizing the panes, and you should see the look you desire.

    2. You can get a reference to the DockableControlPane directly from the control it holds, and then from the DockableControlPane you can easily get a reference to its parent DockAreaPane.  For example:

                DockableControlPane dcp = this.ultraDockManager1.PaneFromControl(btn);
                DockAreaPane dap = dcp.DockAreaPane;

    ~Kim~