This is a migrated thread and some comments may be shown as answers.

Pinning an auto hidden DockPanel

2 Answers 105 Views
Dock
This is a migrated thread and some comments may be shown as answers.
johns
Top achievements
Rank 1
johns asked on 11 Oct 2007, 03:55 PM
I have a DockingManger that has two DockPanels setup at design time.
One of the DockPanels I want to allow auto hiding and pinning, the other not.  This works just fine, but I also do not want to allow other potential DockPanels to be docked to this DockingManger.  To do so I set the AllowDocking property on the DockingManger to false.

Unfortunately a side effect of doing so prevents an auto hidden DockPanel from being re-pinned. 

Is there a way around this?

2 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 12 Oct 2007, 04:14 PM
Hello johns,

You may use this workaround. Just handle the DockingManager DockingStateChanged event and VisisbleChanged event of desired DockPanel:

void dockPanel1_VisibleChanged(object sender, EventArgs e) 
    if(dockPanel1.DockState == DockState.AutoHide && dockPanel1.Visible) 
    { 
        dockingManager1.AllowDocking = true
    } 
 
private void dockingManager1_DockingStateChanged(object sender, DockingChangedEventArgs e) 
    if(e.DockObject == dockPanel1 && dockPanel1.DockState == DockState.Docked ) 
    { 
        dockingManager1.AllowDocking = false
    } 

I hope this was helpful.
 

Kind regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
johns
Top achievements
Rank 1
answered on 17 Oct 2007, 04:43 PM
Thank you, that did the trick.
Tags
Dock
Asked by
johns
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
johns
Top achievements
Rank 1
Share this question
or