DreadAngel
DreadAngel

Reputation: 772

How to deny to a panel to be dragged using WeifenLuo DockPanel Suite

I've started to use WeifenLuo's DockPanel suite, which seems to be very helpful. Anyway here is an issue, which I can't solve: I need to create an VS-like UI - which should contain an "toolpanel", docked on the left side of parent window, and some other child windows docked on center. Pretty simple, yeah?

But how to make that "toolpanel" should be never closed or moved/dragged from it's position - only hidden/shown or size-changed?

I found how to deny to be closed - through FormClosing event - pretty easy, I know - but the rest of? Have anyone any idea?

Thank You in advance.

Upvotes: 2

Views: 1619

Answers (2)

Brian Sweeney
Brian Sweeney

Reputation: 6815

this.AllowEndUserDocking does the trick for me where this is a DockContent. Maybe a later version?

Upvotes: 2

Zdeslav Vojkovic
Zdeslav Vojkovic

Reputation: 14591

you need to 'lock' the PanelPane of your toolpanel window:

toolPanel.PanelPane.AllowDockDragAndDrop = false;

Upvotes: 3

Related Questions