'Declaration Public Overloads Sub Dock( _ ByVal maintainPreviousState As Boolean _ )
public void Dock( bool maintainPreviousState )
The maintainPreviousState parameter is used to determine how grouped floating panes should be re-docked. You can take panes from multiple docking areas and group them together in one floating pane group. You can then dock that floating group. When maintainPreviousState is set to True, the previous dock state of each pane is preserved, and docking the group will cause all of its panes to re-dock at their origninal locations. You can force the panes to remain together (and possibly change their docking location) when the floating group is docked by specifying False for the maintainPreviousState parameter.
If you invoke this method for a floating pane that has never been docked, the pane will dock along the right side of the client area.
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
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void buttonFlyout_Click(object sender, System.EventArgs e) { // 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. DockableControlPane pane = this.ultraDockManager1.ControlPanes[this.ultraDayView1]; this.ShowInFlyout( pane ); } private void ShowInFlyout( DockableControlPane pane ) { // If its already showing and its the active pane, exit // IsFlyoutPaneDisplayed is equivalent to comparing it if (pane.IsFlyoutPaneDisplayed && pane.IsActive) return; // If its currently showing in a flyout window but // its not the active pane, we'll active it and exit if (pane.IsFlyoutPaneDisplayed && !pane.IsActive) { pane.Activate(); return; } // If the pane is closed, show it first if (!pane.IsVisible) pane.Show(); // If another pane is flown out, hide it back first if (pane.Manager.FlyoutPane != null) pane.Manager.FlyIn(); // If the pane is still pinned... if (pane.Pinned) { // 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) pane.Dock(true); // 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); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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