IDataObject Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a format-independent mechanism for transferring data.
public interface class IDataObject
public interface IDataObject
type IDataObject = interface
Public Interface IDataObject
- Derived
Remarks
The IDataObject interface is used by the Clipboard class for data transfer operations like drag-and-drop.
When implemented by a class, the IDataObject methods enable a single data object to offer data in multiple formats. Offering data in multiple formats tends to make the data usable by a wider variety of applications than if only a single data format were supported.
The DataObject class provides a basic implementation of the IDataObject interface.
Methods
GetData(String, Boolean) |
Retrieves a data object in a specified format, optionally converting the data to the specified format. |
GetData(String) |
Retrieves a data object in a specified format; the data format is specified by a string. |
GetData(Type) |
Retrieves a data object in a specified format; the data format is specified by a Type object. |
GetDataPresent(String, Boolean) |
Checks to see whether the data is available in, or can be converted to, a specified format. A |
GetDataPresent(String) |
Checks to see whether the data is available in, or can be converted to, a specified format; the data format is specified by a string. |
GetDataPresent(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. |
GetFormats() |
Returns a list of all formats that the data in this data object is stored in, or can be converted to. |
GetFormats(Boolean) |
Returns a list of all formats that the data in this data object is stored in. A |
SetData(Object) |
Stores the specified data in this data object, automatically converting the data format from the source object type. |
SetData(String, Object, Boolean) |
Stores the specified data in this data object, along with one or more specified data formats. This overload includes a |
SetData(String, Object) |
Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a string. |
SetData(Type, Object) |
Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a Type class. |
Applies to
See also
.NET