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.
Assembly: System.Windows (in System.Windows.dll)
The data that is contained in a DragEventArgs instance is useful only when the event that generated the data is Drop. For other events that also use DragEventArgs (DragEnter, DragLeave, DragOver), the value of 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.
The Silverlight implementation of IDataObject is symmetrical with the WPF implementation in terms of API surface. However, the only scenario that is enabled by the returned data object in is file drop. Therefore, these IDataObject APIs are not enabled on the returned data object:
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(String).
Silverlight file drop does not support dropping a directory. However, it does support selecting and then dropping multiple files. In this case, the contains a data payload that is in the FileDrop format. You might need to parse or process this format as an enumeration or array, depending on your specific scenario and requirements.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.