'Declaration Public Event BeforeToggleDockState As CancelablePaneEventHandler
public event CancelablePaneEventHandler BeforeToggleDockState
The event handler receives an argument of type CancelablePaneEventArgs containing data related to this event. The following CancelablePaneEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
Pane | DockablePaneBase instance associated with the event. This property is read-only. |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub ultraDockManager1_BeforeToggleDockState(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelablePaneEventArgs) Handles ultraDockManager1.BeforeToggleDockState ' The BeforeToggleDockState is invoked when the user ' double clicks on the caption or tab item for a pane ' but before the window has changed position from ' floating to docked (or vice versa). ' The Cancel parameter can be set to true to cancel ' the change. ' Assuming a structure of: ' DockArea1 ' Child1 ' Child2 ' DockArea2 ' Child3 ' With the following code, the user could double click ' on the caption of DockArea1, DockArea2, or Child3 ' to change they're state from floating to docked. ' ' Do not allow the members of a group to have their ' state toggled from docked to floating or floating ' to docked if the pane has siblings ' If (Not e.Pane.Parent Is Nothing AndAlso e.Pane.Parent.Panes.Count > 1) Then e.Cancel = True End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void ultraDockManager1_BeforeToggleDockState(object sender, Infragistics.Win.UltraWinDock.CancelablePaneEventArgs e) { // The BeforeToggleDockState is invoked when the user // double clicks on the caption or tab item for a pane // but before the window has changed position from // floating to docked (or vice versa). // The Cancel parameter can be set to true to cancel // the change. // Assuming a structure of: // DockArea1 // Child1 // Child2 // DockArea2 // Child3 // With the following code, the user could double click // on the caption of DockArea1, DockArea2, or Child3 // to change they're state from floating to docked. // // Do not allow the members of a group to have their // state toggled from docked to floating or floating // to docked if the pane has siblings // if (e.Pane.Parent != null && e.Pane.Parent.Panes.Count > 1) e.Cancel = 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