

'Declaration<ContentPropertyAttribute("Children")> <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)> <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)> <SerializableAttribute()> Public Class LayoutPanel Inherits Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup(Of ILayoutPanelElement) Implements ILayoutContainer, ILayoutElement, ILayoutElementWithVisibility, ILayoutGroup, ILayoutOrientableGroup, ILayoutPanelElement
'UsageDim instance As LayoutPanel
[ContentProperty("Children")] [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] [Serializable()] public class LayoutPanel : Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>, ILayoutContainer, ILayoutElement, ILayoutElementWithVisibility, ILayoutGroup, ILayoutOrientableGroup, ILayoutPanelElement
A LayoutPanel can contain child panes directly (that is, LayoutAnchorablePane and LayoutDocumentPane). Panes in turn contain the actual content (that is, LayoutAnchorable or LayoutDocument elements, both of which derive from LayoutContent).
A LayoutPanel can also contain "pane group" elements (i.e., LayoutAnchorablePaneGroup or LayoutDocumentPaneGroup), which group child panes together and allow various characteristics to be determined, such as the initial width/height the docked group occupies, the initial width/height of floating windows created from content dragged from them, and the orientation of the panes in the group (which is independent of the orientation of the LayoutPanel).
The RootPanel property of the LayoutRoot class is set to an instance of this class.
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.LayoutGroupBase
Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>
Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<T>
Xceed.Wpf.AvalonDock.Layout.LayoutPanel
| Name | Description | |
|---|---|---|
![]() | LayoutPanel Constructor | Overloaded. Initializes a new instance of the LayoutPanel class. |
| Name | Description | |
|---|---|---|
![]() | AllowDuplicateContent | Gets or sets if LayoutDocumentPane (or LayoutAnchorablePane) allows the dropping of duplicate contents (according to its Title and ContentId). When set to false, the LayoutDocumentPane (or LayoutAnchorablePane) hides the OverlayWindow.DropInto button to prevent dropping of duplicate content. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | CanRepositionItems | Gets or sets a value indicating whether the LayoutDocuments can be repositioned in the LayoutDocumentPane via a drag of the LayoutDocumentTabItems, or if the LayoutAnchorables can be repositioned in the LayoutAnchorablePane via a drag of the LayoutAnchorableTabItems. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | Children | Gets the child elements. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | ChildrenCount | Gets the number of child elements. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | DependencyObjectType | (Inherited from System.Windows.DependencyObject) |
![]() | Dispatcher | (Inherited from System.Windows.Threading.DispatcherObject) |
![]() | DockHeight | Gets or sets the initial height of the dock. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | DockMinHeight | Gets or sets the minimum dock height. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | DockMinWidth | Gets or sets the minimum dock width. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | DockWidth | Gets or sets the initial width of the dock. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | FloatingHeight | Gets or sets the initial height of floating windows. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | FloatingLeft | Gets the initial position of the left side of a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | FloatingTop | Gets the initial position of the topside of a floating window. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | FloatingWidth | Gets or sets the initial width of floating windows. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | IsFloatingAsTopMost | Gets or sets if a pane or group will appear over all other windows when floating. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | IsMaximized | Gets whether the element is maximized. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutPositionableGroup<ILayoutPanelElement>) |
![]() | IsSealed | (Inherited from System.Windows.DependencyObject) |
![]() | IsVisible | Gets whether the layout group is visible. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | Orientation | Gets or sets the orientation of the panes the panel contains. |
![]() | Parent | Gets or sets the parent container of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
![]() | Root | Gets or sets the root of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement) |
| Name | Description | |
|---|---|---|
![]() | ClearValue | Overloaded. (Inherited from System.Windows.DependencyObject) |
![]() | CoerceValue | (Inherited from System.Windows.DependencyObject) |
![]() | ComputeVisibility | Determines whether an element is visible. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | Equals | (Inherited from System.Windows.DependencyObject) |
![]() | GetHashCode | (Inherited from System.Windows.DependencyObject) |
![]() | GetLocalValueEnumerator | (Inherited from System.Windows.DependencyObject) |
![]() | GetSchema | Returns null. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | GetValue | (Inherited from System.Windows.DependencyObject) |
![]() | IndexOfChild | Returns the index of the specified child layout element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | InsertChildAt | Inserts the specified child layout element at the specified index. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | InvalidateProperty | (Inherited from System.Windows.DependencyObject) |
![]() | MoveChild | Moves a child from an old index to a new index within a pane (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | ReadLocalValue | (Inherited from System.Windows.DependencyObject) |
![]() | ReadXml | Overridden. Reads serialized layout information using the specified XmlReader. |
![]() | RemoveChild | Removes the specified child ILayoutElement. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | RemoveChildAt | Removes the child element at the specified index. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | ReplaceChild | Replaces a child ILayoutElement with a new one. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | ReplaceChildAt | Replaces the child element at the specified index with the specified element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<T>) |
![]() | SetCurrentValue | (Inherited from System.Windows.DependencyObject) |
![]() | SetValue | Overloaded. (Inherited from System.Windows.DependencyObject) |
![]() | WriteXml | Overridden. Writes serialized layout information using the specified XmlWriter. |
| Name | Description | |
|---|---|---|
![]() | ContainsChildOfType | Overloaded. Indicates whether a child of a specified type is contained in the ILayoutContainer. |
![]() | 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. |
![]() | IsOfType<T,S> | Returns whether the specified container is of either of the specified types. |
![]() | ShowDialog | Overloaded. |
| Name | Description | |
|---|---|---|
![]() | ChildrenCollectionChanged | Raised when the child collection changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase) |
![]() | ChildrenTreeChanged | Raised when the children tree changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase) |
![]() | 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) |
.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.