Version

SplitterDragging Event (UltraTabbedMdiManager)

Event that occurs when the splitter bar for an MdiTabGroup is about to be repositioned.
Syntax
'Declaration
 
Public Event SplitterDragging As MdiSplitterDraggingEventHandler
public event MdiSplitterDraggingEventHandler SplitterDragging
Event Data

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

Remarks

All MdiTabGroup objects in the TabGroups collection have a splitter bar except the last one. The splitter bar is used by the end user to modify the Extent of a tab group. When the user presses the logical left mouse button on the splitter bar, the SplitterDragging event is invoked to determine whether to allow the splitter bar to be repositioned. If the event is not cancelled, the user may move the splitter bar. Once the splitter bar is released, the Extent is updated (as well as that of the adjacent tab group) and the SplitterDragged event is invoked.

Example
The following example demonstrates how to use the SplitterDragging event of the UltraTabbedMdiManager.

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.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabbedMdi

Private Sub ultraTabbedMdiManager1_SplitterDragging(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.MdiSplitterDraggingEventArgs) Handles ultraTabbedMdiManager1.SplitterDragging
    ' The 'SplitterDragging' is invoked before a drag operation
    ' for the splitter bar of an MdiTabGroup begins.

    ' The 'Cancel' parameter may be set to true to 
    ' prevent the drag operation from beginning.
    '
    'e.Cancel = True

    ' The 'TabGroup' parameter returns the MdiTabGroup
    ' object whose splitter bar will be moved.
    '

    ' get the index of the tab group being moved
    Dim index As Integer = e.TabGroup.Manager.TabGroups.IndexOf(e.TabGroup)

    ' the other affect tab group will be the next one
    'Dim adjacentTabGroup As MdiTabGroup = e.TabGroup.Manager.TabGroups(index + 1)

    Dim msg As String = String.Format("SplitterDragging: Moving bar between {0} and {1}", index, index + 1)

    System.Diagnostics.Debug.WriteLine(msg)
End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;
using Infragistics.Win.UltraWinTabbedMdi;

private void ultraTabbedMdiManager1_SplitterDragging(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiSplitterDraggingEventArgs e)
{
	// The 'SplitterDragging' is invoked before a drag operation
	// for the splitter bar of an MdiTabGroup begins.

	// The 'Cancel' parameter may be set to true to 
	// prevent the drag operation from beginning.
	//
	//e.Cancel = true;

	// The 'TabGroup' parameter returns the MdiTabGroup
	// object whose splitter bar will be moved.
	//

	// get the index of the tab group being moved
	int index = e.TabGroup.Manager.TabGroups.IndexOf(e.TabGroup);

	// the other affect tab group will be the next one
	//MdiTabGroup adjacentTabGroup = e.TabGroup.Manager.TabGroups[index + 1];

	string msg = string.Format("SplitterDragging: Moving bar between {0} and {1}", index, index + 1);

	System.Diagnostics.Debug.WriteLine(msg);
}
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