DragEventArgs.Data Property

July 28, 2014

Gets a data object (implements IDataObject) that contains the data associated with the corresponding drag event. This value is not useful in all event cases; see Remarks.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public IDataObject Data { get; }

Property Value

Type: System.Windows.IDataObject
The data object that contains the data that is associated with the corresponding drag event.

For other events that also use DragEventArgs the value of Data is not null. However, any attempt to call the IDataObject API on that object always raises a SecurityException. This ensures that only the drop target is permitted access to the data.

  • Type - typed format parameter APIs are not supported.

  • APIs that support automatic format conversion are not supported.

  • The data object is read-only to callers. Therefore, all signatures of SetData are not supported.

For more information about accessing data from a data object, see GetData.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft