バージョン 24.2 (最新)

ItemDragOver イベント

UltraExplorerBarItem が有効なドロップ位置の上にドラッグされたときに発生します。
シンタックス
public event ItemDragOverEventHandler ItemDragOver
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、ItemDragOverEventArgs 型の引数を受け取りました。次の ItemDragOverEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
AllowDrop UltraExplorerBarItemTargetGroup にドロップできるかどうかを取得または設定します。
DragAction UltraExplorerBarItem をドロップしたときに、UltraExplorerBarItem が移動されるか、またはコピーされるかを取得または設定します。
DragCursor TargetGroupの上にあるときに表示されるカーソルを取得または設定します。nullに設定すると、デフォルトのカーソルが使用されます。
Item ItemDragOverEventArgs に関連付けられた UltraExplorerBarItem を返します。
TargetGroup UltraExplorerBarItem がドロップされる UltraExplorerBarGroup を返します。
X 画面座標内の、マウス位置のX座標を返します。
Y 画面座標内の、マウス位置のY座標を返します。
使用例
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
'宣言
 
Public Event ItemDragOver As ItemDragOverEventHandler
 
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;
			}
		}
'宣言
 
Public Event ItemDragOver As ItemDragOverEventHandler
 
参照