Version

ItemDragOverEventArgs Constructor

Constructor
Syntax
'Declaration
 
Public Function New( _
   ByVal item As UltraExplorerBarItem, _
   ByVal allowDrop As Boolean, _
   ByVal dragAction As ItemDragAction, _
   ByVal dragCursor As Cursor, _
   ByVal dragPoint As Point, _
   ByVal targetGroup As UltraExplorerBarGroup _
)
public ItemDragOverEventArgs( 
   UltraExplorerBarItem item,
   bool allowDrop,
   ItemDragAction dragAction,
   Cursor dragCursor,
   Point dragPoint,
   UltraExplorerBarGroup targetGroup
)

Parameters

item
The UltraExplorerBarItem associated with the ItemDragOverEventArgs.
allowDrop
Specifies whether the UltraExplorerBarItem can be dropped in the TargetGroup.
dragAction
Specifies whether a drop of the UltraExplorerBarItem should result in a move or copy of the UltraExplorerBarItem.
dragCursor
The cursor to be displayed while over the TargetGroup. If set to null a default cursor will be supplied.
dragPoint
The coordinates of the mouse position in screen coordinates.
targetGroup
The UltraExplorerBarGroup that the UltraExplorerBarItem will be dropped on.
Example
The following code shows how to process the ItemDragOver 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 System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar

	Private Sub ultraExplorerBar1_ItemDragOver(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinExplorerBar.ItemDragOverEventArgs) Handles ultraExplorerBar1.ItemDragOver

		Debug.WriteLine(String.Format("The item '{0}' is being dragged to group '{1}'", e.Item.Text, e.TargetGroup))
		Debug.WriteLine(String.Format("The group is currently over point: ", New Point(e.X, e.Y).ToString()))


		' Don't allow the Item to be dropped if the target group has a key of "System" and
		' the Item is being moved
		If (e.TargetGroup.Key = "System" AndAlso e.DragAction = ItemDragAction.Move) Then
			e.AllowDrop = False
			e.DragCursor = Cursors.No
		End If

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;

		private void ultraExplorerBar1_ItemDragOver(object sender, Infragistics.Win.UltraWinExplorerBar.ItemDragOverEventArgs e)
		{
			Debug.WriteLine(string.Format("The item '{0}' is being dragged to group '{1}'", e.Item.Text, e.TargetGroup));
			Debug.WriteLine(string.Format("The group is currently over point: ", new Point(e.X, e.Y).ToString()));


			// Don't allow the Item to be dropped if the target group has a key of "System" and
			// the Item is being moved
			if (e.TargetGroup.Key == "System"  &&  e.DragAction == ItemDragAction.Move)
			{
				e.AllowDrop		= false;
				e.DragCursor	= Cursors.No;
			}
		}
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