Xceed Toolkit Plus for WPF v5.1 Documentation
Xceed.Wpf.AvalonDock Assembly / Xceed.Wpf.AvalonDock.Layout Namespace / LayoutAnchorSide Class
Members Example


In This Topic
    LayoutAnchorSide Class
    In This Topic
    Represents a "side" in a DockingManager.
    Syntax
    'Declaration
     
    <ContentPropertyAttribute("Children")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    <SerializableAttribute()>
    Public Class LayoutAnchorSide 
       Inherits Xceed.Wpf.AvalonDock.Layout.LayoutGroup(Of LayoutAnchorGroup)
       Implements ILayoutContainerILayoutElementILayoutGroup 
    'Usage
     
    Dim instance As LayoutAnchorSide
    [ContentProperty("Children")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    [Serializable()]
    public class LayoutAnchorSide : Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>, ILayoutContainerILayoutElementILayoutGroup  
    Remarks

    To use LayoutAnchorSide, add LayoutAnchorable elements to a LayoutAnchorGroup, and add the resulting LayoutAnchorGroup to an instance of LayoutAnchorSide. The resulting LayoutAnchorSide is then assigned to a "Side" property (e.g., LeftSide, TopSide) of the LayoutRoot object held in the Layout property of DockingManager.

    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/LayoutDocumentPaneLayoutAnchorablePaneGroup/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.

    Example
    The following shows how to use autohidden windows, as well as various other elements.
    <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>
    Inheritance Hierarchy

    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.LayoutAnchorSide

    Public Constructors
     NameDescription
    Public ConstructorInitializes a new instance of the class.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets the child elements. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public PropertyGets the number of child elements. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public Property (Inherited from System.Windows.Threading.DispatcherObject)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public PropertyGets whether the layout group is visible. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public PropertyGets or sets the parent container of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Public PropertyGets or sets the root of the element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Public PropertyGets the  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded.  (Inherited from System.Windows.DependencyObject)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodDetermines whether an element is visible. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodReturns null. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodReturns the index of the specified child layout element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public MethodInserts the specified child layout element at the specified index. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodMoves a child from an old index to a new index within a pane (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodReads serialized layout information using the specified XmlReader. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public MethodRemoves the specified child ILayoutElement. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public MethodRemoves the child element at the specified index. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public MethodReplaces a child ILayoutElement with a new one. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public MethodReplaces the child element at the specified index with the specified element. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Public Method (Inherited from System.Windows.DependencyObject)
    Public MethodOverloaded.  (Inherited from System.Windows.DependencyObject)
    Public MethodWrites serialized layout information using the specified XmlWriter. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Top
    Protected Methods
     NameDescription
    Protected Method

    Called when a child has been moved.

    (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Protected MethodOverridden. Gets whether the instance is visible.  
    Protected Method (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase)
    Protected MethodCalled when the ChildrenCollectionChanged event is raised. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase)
    Protected MethodCalled when the ChildrenTreeChanged event is raised. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase)
    Protected MethodCalled when IsVisible has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroup<LayoutAnchorGroup>)
    Protected MethodOverridden. Called when Parent has changed, updating the Side property.  
    Protected MethodProvides derived classes an opportunity to execute code before the Parent property changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Protected Method (Inherited from System.Windows.DependencyObject)
    Protected MethodProvides derived classes an opportunity to handle changes to the Root property. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Protected MethodRaises the PropertyChanged event for the specified property name. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Protected MethodRaises the PropertyChanging event for the specified property name. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Protected Internal Method (Inherited from System.Windows.DependencyObject)
    Top
    Public Events
     NameDescription
    Public EventRaised when the child collection changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase)
    Public EventRaised when the children tree changes. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutGroupBase)
    Public EventRaised when a property has changed. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Public EventRaised when a property is about to change. (Inherited from Xceed.Wpf.AvalonDock.Layout.LayoutElement)
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also