DragEventArgs 类

定义

包含与所有拖放事件(DragEnterDragLeaveDragOverDrop)相关的参数。Contains arguments relevant to all drag-and-drop events (DragEnter, DragLeave, DragOver, and Drop).

public ref class DragEventArgs sealed : System::Windows::RoutedEventArgs
public sealed class DragEventArgs : System.Windows.RoutedEventArgs
type DragEventArgs = class
    inherit RoutedEventArgs
Public NotInheritable Class DragEventArgs
Inherits RoutedEventArgs
继承

属性

AllowedEffects

获取 DragDropEffects 枚举的成员,它指定拖动事件的发起方允许哪些操作。Gets a member of the DragDropEffects enumeration that specifies which operations are allowed by the originator of the drag event.

Data

获取一个数据对象,该对象包含与对应拖动事件关联的数据。Gets a data object that contains the data associated with the corresponding drag event.

Effects

获取或设置目标拖放操作。Gets or sets the target drag-and-drop operation.

Handled

获取或设置一个值,该值指示针对路由事件(在其经过路由时)的事件处理的当前状态。Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

(继承自 RoutedEventArgs)
KeyStates

获取一个标志枚举,指示 Shift、Ctrl 和 Alt 键的当前状态以及鼠标按钮的状态。Gets a flag enumeration indicating the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons.

OriginalSource

在父类进行任何可能的 Source 调整之前,获取由纯命中测试确定的原始报告源。Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

(继承自 RoutedEventArgs)
RoutedEvent

获取或设置与此 RoutedEventArgs 实例关联的 RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.

(继承自 RoutedEventArgs)
Source

获取或设置对引发事件的对象的引用。Gets or sets a reference to the object that raised the event.

(继承自 RoutedEventArgs)

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetPosition(IInputElement)

返回与指定 IInputElement 相关的拖动点。Returns a drop point that is relative to a specified IInputElement.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InvokeEventHandler(Delegate, Object)

当在派生类中重写时,提供特定于类型的调用事件处理程序的方式,该方式与基实现相比可提高效率。When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.

(继承自 RoutedEventArgs)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnSetSource(Object)

在派生类中重写时,每当实例的 Source 属性的值发生更改,则提供一个通知回调入口点。When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

(继承自 RoutedEventArgs)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于