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
20
How to set focus for a DockableControlPane
posted

Hi,

Whenever I create a new DockableControlPane, the new pane will get focused and becomes the selected pane.  We do not want this behavior. We want to keep the current selected pane even after creating a new pane.  I tried the code below but it's not working, 

//save the current active pane

DockableControlPane activePane = this.ultraDockManager1.ActivePane;

//create the new DockableControlPane and add it to the ultraDockManager1

DockableControlPane

 

dcpWin = new DockableControlPane(dWin);

 

DockAreaPane dapTop = new DockAreaPane(dConfig.DockLocation);

dapTop.Panes.Add(dcpWin);

this.ultraDockManager1.DockAreas.Add(dapTop);

//restore back the active pane

if (activePane != null)
                {
                    activePane.IsSelectedTab = true;
                }

However, this doesn't work.  Please help. 

Thanks,

Amy

 

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello Amy,

    I prepared and attached a sample for you. I created one DockAreaPane and added two DockableControlPanes in it. I have a button, which if clicked adds another DockableControlPane to the dock area I already have. This new pane does not receive any focus. The selected pane remains the first one added.

    Please review my sample and feel free to let me know if I misunderstood you or if you have any other questions.

    AddNewPaneNotFocused.zip
Children
No Data