MindFusion.Wpf Pack Programmer's Guide
DockControl Class
Remarks See Also
 





Enables docking of user interface elements.

Namespace: MindFusion.UI.Wpf
Assembly: MindFusion.UI.Wpf

 Syntax

C#  Copy Code

public class DockControl : ItemsControl

Visual Basic  Copy Code

Public Class DockControl
    Inherits ItemsControl

 Remarks

The DockControl enables interactive and programmatic docking of UI elements inside a container. In order to dock elements inside the DockControl they must be explicitly or implicitly wrapped in a DockItem objects. The following example declares a DockControl in XAML and adds two child controls to it - a ListBox and a StackPanel. The first child is docked implicitly.

XAML  Copy Code

<ui:DockControl Padding="0">
  <ListBox>
    <ListBoxItem Content="item 1" />
  </ListBox>
  <ui:DockItem Dock="Right">
    <StackPanel Orientation="Vertical">
      <Button Content="Button 1" Margin="0,0,0,5" />
      <Button Content="Button 2" />
    </StackPanel>
  </ui:DockItem>
</ui:DockControl>

Items can be added and removed from the DockControl programmatically - through the AddItem, RemoveItem and RemoveAllItems methods.

Users can reposition, dock and undock controls inside the DockControl interactively, by left-clicking on the header of the respective DockItem, holding down the mouse button and dragging.

 Example

The following image illustrates a DockControl with several items docked inside:

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control
                            System.Windows.Controls.ItemsControl
                                MindFusion.UI.Wpf.DockControl

 See Also

DockControl Members
MindFusion.UI.Wpf Namespace