Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock
Private Sub buttonFlyout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonFlyout.Click
' A control pane can be referenced by the index, key or
' control from the ControlPanes collection since that is a
' collection of all the DockableControlPane instances managed
' by the UltraDockManager.
Dim pane As DockableControlPane = Me.ultraDockManager1.ControlPanes(Me.ultraDayView1)
Me.ShowInFlyout(pane)
End Sub
Private Sub ShowInFlyout(ByVal pane As DockableControlPane)
' If its already showing and its the active pane, exit
' IsFlyoutPaneDisplayed is equivalent to comparing it
If (pane.IsFlyoutPaneDisplayed AndAlso pane.IsActive) Then
Return
End If
' If its currently showing in a flyout window but
' its not the active pane, we'll active it and exit
If (pane.IsFlyoutPaneDisplayed AndAlso Not pane.IsActive) Then
pane.Activate()
Return
End If
' If the pane is closed, show it first
If Not pane.IsVisible Then
pane.Show()
End If
' If another pane is flown out, hide it back first
If Not pane.Manager.FlyoutPane Is Nothing Then
pane.Manager.FlyIn()
End If
' If the pane is still pinned...
If (pane.Pinned) Then
' If its floating, let dock it and specify true
' for the 'maintainPreviousState' argument which
' indicates whether the pane (and in the case of a
' group, its child panes) return to their previous
' docked locations or if they are docked together
' as they are currently floating. in this example,
' we'll just put it back to where it was. this is
' essentially the same as toggling its state
' i.e. pane.ToggleDockState()
If (pane.DockedState = DockedState.Floating) Then
pane.Dock(True)
End If
' Unpin the pane - this should implicitly show it
pane.Unpin()
' We'll explicitly activate it
pane.Activate()
Else
' If the pane is unpinned, reset the flyout size
pane.FlyoutSize = New Size(200, 200)
' If its already unpinned, we'll slide it out from
' the unpinned tab area and activate it
pane.Flyout(True, True)
End If
End Sub