1
Vote

Fix and provide a way remove dock,close buttons

description

I am having problems with the LayoutPanel.
Where I pin and unpin the LayoutPanel and it throws an InvalidOperationException.
The issue is described here:
http://stackoverflow.com/questions/11987893/remove-avalondock-dock-and-close-buttons/11990622#comment15997712_11990622
Thanks.

comments

Vaccano wrote Aug 17, 2012 at 5:10 PM

If you are using the MVVM approach to Avalon Dock (version 2) then you can put this in your view model:
DockAsDocumentCommand = new DelegateCommand(() => { }, () => false);
AutoHideCommand = new DelegateCommand(() => { }, () => false);
CanClose = false;
CanHide = false;
Those all need to have TwoWay bindings and NotifyPropertyChanged on them.

Once you do that all the options for closing, hiding and moving to another document will be removed or grayed out.

adospace wrote Sep 3, 2012 at 8:30 AM

Hi, could you please explain better which kind of problems you're experiencing? Issue described in SO seems to be related to AD 1.3. Workaround proposed by Vaccanno works great I think, but I'm not sure what you mean with pin/unpin a LayoutPanel.
Adi