Enables docking of user interface elements.
Namespace: MindFusion.UI.Silverlight
Assembly: MindFusion.UI.Silverlight
C#
![]() |
---|
public class DockControl : ItemsControl |
Visual Basic
![]() |
---|
Public Class DockControl |
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
![]() |
---|
<ui:DockControl Padding="0"> |
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.
The following image illustrates a DockControl with several items docked inside:
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.Silverlight.DockControl