Export (0) Print
Expand All

IDataObject Interface

Provides a format-independent mechanism for transferring data.

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

'Declaration
Public Interface IDataObject

  NameDescription
Public methodSupported by Silverlight for Windows PhoneGetData(String)Retrieves a data object in a specified format; the data format is specified by a string.
Public methodSupported by Silverlight for Windows PhoneGetData(Type)Retrieves a data object in a specified format; the data format is specified by a Type object.
Public methodSupported by Silverlight for Windows PhoneGetData(String, Boolean)Retrieves a data object in a specified format, and optionally, converts the data to the specified format.
Public methodSupported by Silverlight for Windows PhoneGetDataPresent(String)Checks whether the data is available in, or can be converted to, a specified format; the data format is specified by a string.
Public methodSupported by Silverlight for Windows PhoneGetDataPresent(Type)Checks to see whether the data is available in, or can be converted to, a specified format. The data format is specified by a Type object.
Public methodSupported by Silverlight for Windows PhoneGetDataPresent(String, Boolean)Checks whether the data is available in, or can be converted to, a specified format. If the data is not already available in the specified format, a Boolean flag indicates whether to check if the data can be converted to the specified format.
Public methodSupported by Silverlight for Windows PhoneGetFormatsReturns a list of all formats that the data in this data object is stored in, or can be converted to.
Public methodSupported by Silverlight for Windows PhoneGetFormats(Boolean)Returns a list of all formats that the data in this data object is stored in. A Boolean flag indicates whether to also include formats that the data can be automatically converted to.
Public methodSupported by Silverlight for Windows PhoneSetData(Object)Stores the specified data in this data object, and automatically converts the data format from the source object type.
Public methodSupported by Silverlight for Windows PhoneSetData(String, Object)Stores the specified data in this data object, using one or more specified data formats. The data format is specified by a string.
Public methodSupported by Silverlight for Windows PhoneSetData(Type, Object)Stores the specified data in this data object, using one or more specified data formats. The data format is specified by a Type class.
Public methodSupported by Silverlight for Windows PhoneSetData(String, Object, Boolean)Stores the specified data in this data object, using one or more specified data formats. This overload includes a Boolean flag to indicate whether the data may be converted to another format on retrieval.
Top

The API for IDataObject is documented as a general interface, just like it is documented in the equivalent WPF implementation. However, implementing the interface is not a primary Silverlight 5 scenario. For more information about how to retrieve the data from an IDataObject instance that is returned by Data, see the documentation for DataObject, and also see the documentation for individual DataObject members. The DataObject implementation provides the behavior that is invoked whenever you retrieve the value of DragEventArgs.Data.

Important noteImportant Note:

The use of this interface in Silverlight 5 is limited to a particular scenario: enabling a Silverlight 5 UIElement to be a drop target for file list information and returning the data object as an instance of IDataObject.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft