Data Property
Collapse the table of content
Expand the table of content

DragEventArgs.Data Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

© 2017 Microsoft