Version

BeforeDockChangeStart Event

Occurs before a dockable pane drag begins.
Syntax
'Declaration
 
Public Event BeforeDockChangeStart As CancelablePaneEventHandler
public event CancelablePaneEventHandler BeforeDockChangeStart
Event Data

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.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
Pane DockablePaneBase instance associated with the event. This property is read-only.
Example
The following code demonstrates how to use the BeforeDockChangeStart event to prevent the dragging of particular panes.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub ultraDockManager1_BeforeDockChangeStart(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelablePaneEventArgs) Handles ultraDockManager1.BeforeDockChangeStart

    ' The BeforeDockChangeStart is invoked when the a
    ' pane is about to be dragged but before the drag 
    ' operation has begun. The event can be cancelled
    ' by setting the Cancel parameter to true.

    ' Do not allow the tree or list panes
    ' to be dragged individually
    If (e.Pane.Key = "tree" OrElse e.Pane.Key = "list") Then
        e.Cancel = True
    End If

End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;

private void ultraDockManager1_BeforeDockChangeStart(object sender, Infragistics.Win.UltraWinDock.CancelablePaneEventArgs e)
{

	// The BeforeDockChangeStart is invoked when the a
	// pane is about to be dragged but before the drag 
	// operation has begun. The event can be cancelled
	// by setting the Cancel parameter to true.

	// Do not allow the tree or list panes
	// to be dragged individually
	if (e.Pane.Key == "tree" || e.Pane.Key == "list")
		e.Cancel = true;

}
Requirements

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

See Also