-
Notifications
You must be signed in to change notification settings - Fork 321
CanDockAsTabbedDocument
- Dependency Property of LayoutAnchorable
The boolean CanDockAsTabbedDocument property can be used to determine whether LayoutAnchorables and classes inheriting from it can be docked inside the documents pane or not. The following series of screenshots shows the expected behavior when this property is set to false:
The Docked as Tabbed Document docking menu item is dissabled:
The DockingManager offers only docking buttons for the side dockings (left, top, right, bottom) if a LayoutAnchorable is dragged into the documents area (DocumentPane):
The DockingManager overs only docking buttons for the side dockings (left, top, right, bottom) or another LayoutAnchorable (tool window) if a LayoutAnchorable is dragged over another tool window (LayoutAnchorable):
There are many different ways to set the CanDockAsTabbedDocument
property in a LayoutAnchorable to true. One way to do this is via a custom LayoutInitializer with the following code (see MLibTest client):
public bool BeforeInsertAnchorable(LayoutRoot layout,
LayoutAnchorable anchorableToShow,
ILayoutContainer destinationContainer)
{
// AD wants to add the anchorable into destinationContainer
// just for test provide a new anchorablepane
// if the pane is floating let the manager go ahead
LayoutAnchorablePane destPane = destinationContainer as LayoutAnchorablePane;
if (destinationContainer != null &&
destinationContainer.FindParent<LayoutFloatingWindow>() != null)
return false;
var toolsPane = layout.Descendents().OfType<LayoutAnchorablePane>().FirstOrDefault(d => d.Name == "ToolsPane");
if (toolsPane != null)
{
// do not allow this as Tabbed Document
anchorableToShow.CanDockAsTabbedDocument = false;
toolsPane.Children.Add(anchorableToShow);
return true;
}
return false;
}
- WinForms Demo Client
- WPF VS 2013 Demo Client
- WPF MVVM TestApp
- TestApp
- Upgrading to V4.0 or later
- Localization
- Layout Model Control Graph
- AnchorablePaneDropTarget
- AnchorablePaneTabPanel
- ContextMenuEx
- DocumentPaneDropTarget
- DocumentPaneTabPanel
- DockingManager
- DockingManagerDropTarget
- DragService
- DropDownButton
- DropDownControlArea
- DropTarget<T>
- LayoutAnchorableControl
- LayoutAnchorableFloatingWindowControl
- LayoutAnchorControl
- LayoutAnchorGroupControl
- LayoutAnchorablePaneControl
- LayoutAnchorablePaneGroupControl
- LayoutAnchorableTabItem
- LayoutAutoHideWindowControl
- AnchorablePaneTitle
- LayoutAnchorSideControl
- LayoutDocumentControl
- LayoutDocumentFloatingWindowControl
- LayoutDocumentPaneControl
- LayoutDocumentPaneGroupControl
- LayoutDocumentTabItem
- LayoutFloatingWindowControl
- LayoutGridControl<T>
- LayoutGridResizerControl
- LayoutItem
- LayoutAnchorableItem
- LayoutDocumentItem
- LayoutPanelControl
- MenuItemEx
- NavigatorWindow
- OverlayWindow
- TabControlEx
- LayoutAnchorable
- LayoutAnchorableFloatingWindow
- LayoutAnchorGroup
- LayoutAnchorablePane
- LayoutAnchorablePaneGroup
- LayoutAnchorSide
- LayoutContent
- LayoutDocument
- LayoutDocumentFloatingWindow
- LayoutDocumentPane
- LayoutDocumentPaneGroup
- LayoutElement
- LayoutFloatingWindow
- LayoutGroup
- LayoutGroupBase
- LayoutPanel
- LayoutPositionableGroup
- LayoutRoot
- IDropTarget
- ILayoutAnchorablePane
- ILayoutContainer
- ILayoutControl
- ILayoutContentSelector
- ILayoutDocumentPane
- ILayoutElement
- ILayoutElementForFloatingWindow
- ILayoutElementWithVisibility
- ILayoutGroup
- ILayoutPane
- ILayoutPanelElement
- ILayoutPaneSerializable
- ILayoutPositionableElement
- ILayoutPositionableElementWithActualSize
- ILayoutPreviousContainer
- ILayoutOrientableGroup
- ILayoutRoot
- IOverlayWindow
- IOverlayWindowArea
- IOverlayWindowDropTarget
- IOverlayWindowHost
- DropTarget
- ILayoutItem (Interface Design)
- LayoutElement
- LayoutGridControl
- LayoutItem (Class Design)
- TabContolEx (Class Design)
- Window