Version

BeforeSplitterDrag Event

Occurs before a splitter drag begins.
Syntax
'Declaration
 
Public Event BeforeSplitterDrag As CancelablePanesEventHandler
public event CancelablePanesEventHandler BeforeSplitterDrag
Event Data

The event handler receives an argument of type CancelablePanesEventArgs containing data related to this event. The following CancelablePanesEventArgs properties provide information specific to this event.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
Panes DockablePaneBase instances associated with the event. This property is read-only.
Example
The following code demonstrates how to prevent the splitter bar from being resized based on the panes that will be affected.

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_BeforeSplitterDrag(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinDock.CancelablePanesEventArgs) Handles ultraDockManager1.BeforeSplitterDrag

    ' BeforeSplitterDrag fires before the splitter bar adjacent to a
    ' DockAreaPane, between two panes in a horizontal or vertical
    ' split group, or adjacent to a control pane in a
    ' flyout window has been allowed to start a drag. Settings 
    ' Cancel to true will prevent the splitter from being allowed
    ' to drag.

    ' Do not allow the flyout window to be resized
    If (e.Panes.Length = 1) Then
        Dim pane As DockablePaneBase = e.Panes(0)

        ' if the pane that will be resized is the flyout
        ' pane, do not allow it
        If (pane.Manager.FlyoutPane Is pane) Then
            e.Cancel = True
        End If
    End If

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

private void ultraDockManager1_BeforeSplitterDrag(object sender, Infragistics.Win.UltraWinDock.CancelablePanesEventArgs e)
{

	// BeforeSplitterDrag fires before the splitter bar adjacent to a
	// DockAreaPane, between two panes in a horizontal or vertical
	// split group, or adjacent to a control pane in a
	// flyout window has been allowed to start a drag. Settings 
	// Cancel to true will prevent the splitter from being allowed
	// to drag.

	// Do not allow the flyout window to be resized
	if (e.Panes.Length == 1)
	{
		DockablePaneBase pane = e.Panes[0];

		// If the pane that will be resized is the flyout
		// pane, do not allow it
		if (pane.Manager.FlyoutPane == pane)
			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