Version

TabDragging Event

Cancelable event that occurs when an MdiTab is about to be dragged.
Syntax
'Declaration
 
Public Event TabDragging As CancelableMdiTabEventHandler
public event CancelableMdiTabEventHandler TabDragging
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
Tab Returns the associated MdiTab
Remarks

The TabDragging event is invoked before a drag operation for a tab begins. If the event is cancelled, the drag operation will be cancelled. Otherwise, the drag will commence and the TabDragOver event as the tab is dragged. When the drag operation completes successfully (i.e. it is not cancelled using the escape key), the TabDropped event will be invoked.

Note: This event will not be invoked if the resolved AllowDrag for the tab is set to None since that tab is not considered draggable.

Example
The following sample demonstrates how to use the information passed to the TabDragging event.

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_TabDragging(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.CancelableMdiTabEventArgs) Handles ultraTabbedMdiManager1.TabDragging
    ' The 'Cancel' parameter may be set to true to 
    ' prevent the drag operation from beginning.
    '
    'e.Cancel = True

    ' The 'Tab' parameter indicates the tab that will 
    ' be dragged.
    '

    Dim msg As String = String.Format("TabDragging: Tab ['{0}'] is being dragged", e.Tab)

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

private void ultraTabbedMdiManager1_TabDragging(object sender, Infragistics.Win.UltraWinTabbedMdi.CancelableMdiTabEventArgs e)
{
	// The 'Cancel' parameter may be set to true to 
	// prevent the drag operation from beginning.
	//
	//e.Cancel = true;
	
	// The 'Tab' parameter indicates the tab that will 
	// be dragged.
	//

	string msg = string.Format("TabDragging: Tab ['{0}'] is being dragged", e.Tab);

	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