This project has moved. For the latest updates, please go here.

AvalonDock - user-controlled ability to display document pane or not.

Jul 22, 2014 at 1:11 PM

I'm a newbie using AvalonDock, and would like to know if it is possible to 'dynamically' show or hide the LayoutDocumentPane based on user input.

In our application the end-user is basically responsible for creating the layout of a screen, and we give them a 'design mode', in which we make the DockingManager 'editable', allow them to drag on and arrange components (which we build).

One of the options available to them in design mode is to enable/disable Document mode, which basically toggles the ability and visibility of the LayoutDocumentPane.

My question is how would one best achieve this since IsVisible is readonly on the LayoutDocumentPane? I have tried setting the DockWidth to 0 to hide it to no avail.

Would I create 2 different LayoutPanels, one for each mode? And when switching to the disable Document Mode, i move all items from the DocumentsSource into the AnchorablesSource?

Any guidance appreciated.
Aug 5, 2014 at 1:48 PM

Currently, the visibility of the LayoutDocumentPane is based on its Children : if it has children, it's Visible....if it doesn't have chlidren, it's not visible.
Can you remove the LayoutDocumentPane's children when the user disable Document mode in order to hide the LayoutDocumentPane ? An re-add them when the user enable the Document mode.