
Represents a document in the layout model

'Declaration<ContentPropertyAttribute("Content")> <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)> <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)> <SerializableAttribute()> Public Class LayoutDocument Inherits LayoutContent Implements ILayoutElement
'UsageDim instance As LayoutDocument
[ContentProperty("Content")] [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] [Serializable()] public class LayoutDocument : LayoutContent, ILayoutElement
A document is content that can be hosted only in a LayoutDocumentPane. This contrasts with the behavior of LayoutAnchorable, which can be hosted both in a LayoutDocumentPane and a LayoutAnchorablePane. Also, unlike anchorables, documents can't be anchored to a DockingManager border and can't be autohidden: they can only be positioned into a LayoutDocumentPane or floated in a LayoutDocumentFloatingWindow.
AvalonDock adheres to an MVVM design.
The Model is represented by the classes contained in the Xceed.Wpf.AvalonDock.Layout namespace. The classes in this namespace are the layout elements in a layout model (for example LayoutAnchorable/LayoutDocument, LayoutAnchorablePane/LayoutDocumentPane, LayoutAnchorablePaneGroup/LayoutDocumentPaneGroup, etc.) that are used directly in XAML within a DockingManager to describe how the layout is composed.
The View is represented by the classes contained in the Xceed.Wpf.AvalonDock.Controls namespace; these classes are a set of stylizable controls that show the user controls. The names of the view controls typically end with "Control" (for example, LayoutAnchorableControl is the view control, whereas LayoutAnchorable is the model element).
The DockingManager uses various classes (such as the LayoutItem and its derived classes) to perform the role of the ViewModel, preparing the model to be consumed by the view.
There is one and only one logical tree, which has the DockingManager as its root. Even if a control is placed in a different window (i.e., autohidden windows or floating windows), it always belong to the same logical tree below the DockingManager.
<xcad:DockingManager Grid.Row="1" MaxHeight="425" AllowMixedOrientation="True" BorderBrush="Black" BorderThickness="1"> <xcad:DockingManager.DocumentHeaderTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image Source="{Binding IconSource}" Margin="0,0,4,0"/> <TextBlock Text="{Binding Title}" /> </StackPanel> </DataTemplate> </xcad:DockingManager.DocumentHeaderTemplate> <xcad:LayoutRoot x:Name="_layoutRoot"> <xcad:LayoutPanel Orientation="Horizontal"> <xcad:LayoutAnchorablePane DockWidth="200"> <xcad:LayoutAnchorable ContentId="properties" Title="Properties" CanHide="False" CanClose="False" AutoHideWidth="240" IconSource="../Images/property-blue.png"> <xctk:PropertyGrid NameColumnWidth="110" SelectedObject="{Binding ElementName=_layoutRoot, Path=LastFocusedDocument.Content}"/> </xcad:LayoutAnchorable> </xcad:LayoutAnchorablePane> <xcad:LayoutDocumentPaneGroup > <xcad:LayoutDocumentPane> <xcad:LayoutDocument ContentId="document1" Title="Document 1" IconSource="../Images/document.png" > <Button Content="Document 1 Content" HorizontalAlignment="Center" VerticalAlignment="Center"/> </xcad:LayoutDocument> <xcad:LayoutDocument ContentId="document2" Title="Document 2" IconSource="../Images/document.png"> <TextBox Text="Document 2 Content" AcceptsReturn="True"/> </xcad:LayoutDocument> </xcad:LayoutDocumentPane> </xcad:LayoutDocumentPaneGroup > <xcad:LayoutAnchorablePaneGroup DockWidth="125"> <xcad:LayoutAnchorablePane> <xcad:LayoutAnchorable ContentId="alarms" Title="Alarms" IconSource="../Images/alarm-clock-blue.png" > <ListBox> <s:String>Alarm 1</s:String> <s:String>Alarm 2</s:String> <s:String>Alarm 3</s:String> </ListBox> </xcad:LayoutAnchorable> <xcad:LayoutAnchorable ContentId="journal" Title="Journal" > <RichTextBox> <FlowDocument> <Paragraph FontSize="14" FontFamily="Segoe"> This is the content of the Journal Pane. <LineBreak/> A <Bold>RichTextBox</Bold> has been added here </Paragraph> </FlowDocument> </RichTextBox> </xcad:LayoutAnchorable> </xcad:LayoutAnchorablePane> </xcad:LayoutAnchorablePaneGroup> </xcad:LayoutPanel> <xcad:LayoutRoot.LeftSide> <xcad:LayoutAnchorSide> <xcad:LayoutAnchorGroup> <xcad:LayoutAnchorable Title="Agenda" ContentId="agenda" IconSource="../Images/address-book-open.png"> <TextBlock Text="Agenda Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> </xcad:LayoutAnchorable> <xcad:LayoutAnchorable Title="Contacts" ContentId="contacts" IconSource="../Images/address-book--pencil.png" > <TextBlock Text="Contacts Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> </xcad:LayoutAnchorable> </xcad:LayoutAnchorGroup> </xcad:LayoutAnchorSide> </xcad:LayoutRoot.LeftSide> </xcad:LayoutRoot> </xcad:DockingManager>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
Xceed.Wpf.AvalonDock.Layout.LayoutElement
Xceed.Wpf.AvalonDock.Layout.LayoutContent
Xceed.Wpf.AvalonDock.Layout.LayoutDocument
| Name | Description | |
|---|---|---|
![]() | LayoutDocument Constructor | Initializes a new instance of the LayoutDocument class. |
| Name | Description | |
|---|---|---|
![]() | CanClose | Gets or sets whether the content can be closed definitively (removed from the layout and not just hidden). (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | CanFloat | Gets whether the content can be moved to a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | CanMove | Gets or sets if the LayoutDocument can be re-ordered with the other LayoutDocuments. |
![]() | CanTogglePin | Gets or sets if the LayoutDocument/LayoutAnchorable can use the toggle pin button when placed in a LayoutDocumentPane. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Content | Gets or sets the content of the LayoutContent instance. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | ContentId | Gets or sets the ID of the content, which is used to identify the content during serialization/deserialization. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | DependencyObjectType | (Inherited from System.Windows.DependencyObject) |
![]() | Description | Gets or sets the document's description. |
![]() | Dispatcher | (Inherited from System.Windows.Threading.DispatcherObject) |
![]() | FloatingHeight | Gets or sets the height that will be initially used when the content is dragged and then displayed in a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | FloatingLeft | Gets or sets the left edge of a floating window that will contain this content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | FloatingTop | Gets or sets the top edge of a floating window that will contain this content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | FloatingWidth | Gets or sets the width that will be initially used when the content is dragged and then displayed in a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IconSource | Gets the icon source of the content (displayed next on the tab). (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsActive | Gets or sets whether the content is active. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsEnabled | Gets or sets a value indicating whether the LayoutDocument or LayoutAnchorable is enabled. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsFloating | Gets or sets whether the content is in a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsFloatingAsTopMost | Gets or sets if the LayoutAnchorable or LayoutDocument will appear over all other windows when floating. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsLastFocusedDocument | Gets whether the content is the last focused document. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsMaximized | Gets or sets whether a content element is maximized. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsPinned | Gets if the LayoutDocument/LayoutAnchorable is currently pinned in a LayoutDocumentPane. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsSealed | (Inherited from System.Windows.DependencyObject) |
![]() | IsSelected | Gets or sets whether a content element is selected. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsVisible | Gets or sets whether the document is visible. |
![]() | LastActivationTimeStamp | Gets or sets the date and time of the last activation of the content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Parent | Gets or sets the parent container of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | PreviousContainer | Gets or sets the previous container of the content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | PreviousContainerId | Gets or sets the ID of the previous container. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | PreviousContainerIndex | Gets or sets the index of the previous container. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Root | Gets or sets the root of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | Title | Gets or sets the title of the content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | ToolTip | Gets or sets the tooltip of the content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
| Name | Description | |
|---|---|---|
![]() | ClearValue | Overloaded. (Inherited from System.Windows.DependencyObject) |
![]() | Close | Overridden. |
![]() | CoerceValue | (Inherited from System.Windows.DependencyObject) |
![]() | CompareTo | Compares the content of the current instance with the content of the specified object. If it the content cannot be compared, the titles are compared. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Dock | Re-dock the content to its previous container (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | DockAsDocument | Dock the content as document (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Equals | (Inherited from System.Windows.DependencyObject) |
![]() | Float | Programmatically creates a floating window of the content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | GetHashCode | (Inherited from System.Windows.DependencyObject) |
![]() | GetLocalValueEnumerator | (Inherited from System.Windows.DependencyObject) |
![]() | GetSchema | Returns null. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | GetValue | (Inherited from System.Windows.DependencyObject) |
![]() | InvalidateProperty | (Inherited from System.Windows.DependencyObject) |
![]() | ReadLocalValue | (Inherited from System.Windows.DependencyObject) |
![]() | ReadXml | Overridden. Reads serialized layout information using the specified XmlReader |
![]() | SetCurrentValue | (Inherited from System.Windows.DependencyObject) |
![]() | SetValue | Overloaded. (Inherited from System.Windows.DependencyObject) |
![]() | TogglePin | Modifies the pin status of the LayoutDocument/LayoutAnchorable from unpinned to pinned (or vice-versa) in a LayoutDocumentPane. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | WriteXml | Overridden. Writes serialized layout information using the specified XmlWriter |
| Name | Description | |
|---|---|---|
![]() | InternalDock | Overridden. Docks the layout document. |
![]() | OnClosed | Called when the Closed event has been raised. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnClosing | Called when the Closing event has been raised. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnIsActiveChanged | Provides derived classes an opportunity to handle changes to the IsActive property. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnIsSelectedChanged | Provides derived classes an opportunity to handle changes to the IsSelected property. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnParentChanged | Called when Parent has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnParentChanging | Provides an opportunity to execute code before Parent changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | OnPropertyChanged | (Inherited from System.Windows.DependencyObject) |
![]() | OnRootChanged | Provides derived classes an opportunity to handle changes to the Root property. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | OnToggledPin | (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | RaisePropertyChanged | Raises the PropertyChanged event for the specified property name. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | RaisePropertyChanging | Raises the PropertyChanging event for the specified property name. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | ShouldSerializeProperty | (Inherited from System.Windows.DependencyObject) |
| Name | Description | |
|---|---|---|
![]() | Descendents | Returns the descendents of the specified ILayoutElement. |
![]() | FindLogicalAncestor<T> | Finds the logical ancenster |
![]() | FindLogicalAncestorsAndSelf | |
![]() | FindLogicalChildren<T> | Find the logical children. |
![]() | FindParent<T> | Finds the parent of the specified type of the specified ILayoutElement. |
![]() | FindVisualAncestor<T> | Finds the visual ancestor. |
![]() | FindVisualChildren<T> | Finds the visual children. |
![]() | FindVisualTreeRoot | Finds the visual tree root. |
![]() | GetRoot | Returns the root of the specified ILayoutElement. |
![]() | GetSide | Returns the anchor side of the specified ILayoutElement. |
![]() | ShowDialog | Overloaded. |
| Name | Description | |
|---|---|---|
![]() | Closed | Raised when the content is closed (i.e., removed definitively from the layout). (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | Closing | Raised when the content is about to be closed (i.e. removed definitively from the layout). (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsActiveChanged | Raised when the IsActive property has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | IsSelectedChanged | Raised when the IsSelected property has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
![]() | PropertyChanged | Raised when a property has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | PropertyChanging | Raised when a property is about to change. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | ToggledPin | Raised when a LayoutContent's pin is pinned or unpinned. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutContent) |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.