Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock
Private Sub btnReposition_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReposition.Click
' The Float, Dock and ToggleState methods are the main
' mechanism for repositioning panes. However, the reposition
' method may also be used to reposition panes. For example,
' to float all panes in a single dock area:
' Suspend any sizing changes
Me.ultraDockManager1.SuspendLayout()
' Create a floating dock area
Dim dockArea As DockAreaPane = Me.ultraDockManager1.DockAreas.Add(DockedLocation.Floating)
Dim controlPane As DockableControlPane
' Iterate all the control panes and reposition them
' to the
For Each controlPane In Me.ultraDockManager1.ControlPanes
If Not controlPane.ParentFloating Is Nothing Then
'this pane had a floating parent at one point
'but this will now be changed since we are repositioning
'it to a new floating dock area
Debug.WriteLine(String.Format("Control Pane '{0}' previously had a floating parent - '{1}'.", _
controlPane, controlPane.ParentFloating))
End If
If Not controlPane.ParentDocked Is Nothing Then
Debug.WriteLine(String.Format("Control Pane '{0}' has a docked parent ('{1}') that it will be repositioned to if you double click the pane.", _
controlPane, controlPane.ParentDocked))
End If
'reposition it to the new floating dock area
controlPane.Reposition(dockArea)
Next
' Initialize some properties on the new dock area
' in this case, we'll put them into a sliding group
'where the sliding buttons are vertically positioned
dockArea.ChildPaneStyle = ChildPaneStyle.SlidingGroup
dockArea.GroupSettings.SlidingGroupOrientation = DefaultableOrientation.Vertical
' Initialize the size and caption for the dock area
dockArea.Size = New Size(300, 150)
dockArea.Text = "Floating Controls"
dockArea.FloatingLocation = New Point(150, 50)
' Resume any pending size changes
Me.ultraDockManager1.ResumeLayout()
End Sub