Share via


InDrag Property

InDrag Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. Specifies whether the TreeView control is currently in drag-drop mode.

Applies to

SelectionEventArgs Class

Syntax

Visual Basic .NET

Property InDrag As Boolean

C#

bool InDrag

Remarks

This property is read-only.

Examples

Visual Basic .NET

The following example shows a Selection Event handler function that displays whether or not the control is in drag-drop mode.

Private Sub OnSelection(ByVal o As Object, ByVal e As EventArgs) Handles treeView.Selection

     ' Declare the SelectionEventArgs object.
     Dim evtArgs As SelectionEventArgs

     ' Cast e to a SelectionEventArgs object.
     evtArgs = CType(e, SelectionEventArgs)

     If evtArgs.InDrag Then
	  Debug.WriteLine("Control is in drag-drop mode.")
     Else
	  Debug.WriteLine("Control is not in drag-drop mode.")
     End If
End Sub

C#

The following example shows a Selection Event handler function that displays whether or not the control is in drag-drop mode.

void OnSelection(object o, EventArgs e )
{
     // Cast e to a SelectionEventArgs object.
     SelectionEventArgs evtArgs = (SelectionEventArgs)e;

     if(evtArgs.InDrag)
          Debug.WriteLine("Control is in drag-drop mode.");
     else
          Debug.WriteLine("Control is not in drag-drop mode.");

}

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.