2

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.

DreadAngel
  • 772
  • 11
  • 30

2 Answers2

3

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

toolPanel.PanelPane.AllowDockDragAndDrop = false;
Zdeslav Vojkovic
  • 14,391
  • 32
  • 45
2

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

Brian Sweeney
  • 6,693
  • 14
  • 54
  • 69