DataObject Class
Provides a basic implementation of the IDataObject interface, which defines a format-independent mechanism for transferring data.
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() | DataObject() | Initializes a new instance of the DataObject class. |
![]() | DataObject(Object^) | Initializes a new instance of the DataObject class that contains the specified data. |
![]() | DataObject(String^, Object^) | Initializes a new instance of the DataObject class that contains the specified data and its associated format; the format is specified by a string. |
![]() | DataObject(String^, Object^, Boolean) | Initializes a new instance of the DataObject class that contains the specified data and its associated format; the format is specified by a string. This overload includes a Boolean flag to indicate whether the data may be converted to another format on retrieval. |
![]() | DataObject(Type^, Object^) | Initializes a new instance of the DataObject class that contains the specified data and its associated format; the data format is specified by a Type object. |
| Name | Description | |
|---|---|---|
![]() ![]() | AddCopyingHandler(DependencyObject^, DataObjectCopyingEventHandler^) | Adds a Copying event handler to a specified dependency object. |
![]() ![]() | AddPastingHandler(DependencyObject^, DataObjectPastingEventHandler^) | Adds a Pasting event handler to a specified dependency object. |
![]() ![]() | AddSettingDataHandler(DependencyObject^, DataObjectSettingDataEventHandler^) | Adds a SettingData event handler to a specified dependency object. |
![]() | ContainsAudio() | Queries a data object for the presence of data in the WaveAudio data format. |
![]() | ContainsFileDropList() | Queries a data object for the presence of data in the FileDrop data format. |
![]() | ContainsImage() | Queries a data object for the presence of data in the Bitmap data format. |
![]() | ContainsText() | Queries a data object for the presence of data in the UnicodeText format. |
![]() | ContainsText(TextDataFormat) | Queries a data object for the presence of data in a text data format. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetAudioStream() | Returns a stream that contains data in the WaveAudio data format. |
![]() | GetData(String^) | Returns data in a format specified by a string. |
![]() | GetData(String^, Boolean) | Returns a data object in a specified format, optionally converting the data to the specified format. |
![]() | GetData(Type^) | Returns a data object in a format specified by a Type object. |
![]() | GetDataPresent(String^) | Determines whether the data is available in, or can be converted to, a format specified by a string. |
![]() | GetDataPresent(String^, Boolean) | Determines whether the data is available in, or can be converted to, a specified format. A Boolean flag indicates whether to check if the data can be converted to the specified format if it is not available in that format. |
![]() | GetDataPresent(Type^) | Determines whether the data is available in, or can be converted to, a format specified by a Type object. |
![]() | GetFileDropList() | Returns a string collection that contains a list of dropped files. |
![]() | GetFormats() | Returns a list of formats in which the data in this data object is stored, or can be converted to. |
![]() | GetFormats(Boolean) | Returns a list of formats in which the data in this data object is stored. A Boolean flag indicates whether to also include formats that the data can be automatically converted to. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetImage() | Returns a BitmapSource object that contains data in the Bitmap format. |
![]() | GetText() | Returns a string that contains the UnicodeText data in this data object. |
![]() | GetText(TextDataFormat) | Returns a string that contains text data of the specified format in this data object. |
![]() | GetType() | |
![]() ![]() | RemoveCopyingHandler(DependencyObject^, DataObjectCopyingEventHandler^) | Removes a Copying event handler from a specified dependency object. |
![]() ![]() | RemovePastingHandler(DependencyObject^, DataObjectPastingEventHandler^) | Removes a Pasting event handler from a specified dependency object. |
![]() ![]() | RemoveSettingDataHandler(DependencyObject^, DataObjectSettingDataEventHandler^) | Removes a SettingData event handler from a specified dependency object. |
![]() | SetAudio(array<Byte>^) | Stores audio data (WaveAudio data format) in this data object. The audio data is specified as a byte array. |
![]() | SetAudio(Stream^) | Stores audio data (WaveAudio data format) in this data object. The audio data is specified as a stream. |
![]() | SetData(Object^) | Stores the specified data in this data object, automatically determining the data format from the source object type. |
![]() | 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(String^, Object^, Boolean) | Stores the specified data in this data object, along with one or more specified data formats. This overload includes a Boolean flag to indicate whether the data can be converted to another format on retrieval. |
![]() | 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 object. |
![]() | SetFileDropList(StringCollection^) | Stores FileDrop data in this data object. The dropped file list is specified as a string collection. |
![]() | SetImage(BitmapSource^) | Stores Bitmap data in this data object. The image data is specified as a BitmapSource. |
![]() | SetText(String^) | Stores UnicodeText data, specified as a string, in this data object. |
![]() | SetText(String^, TextDataFormat) | Stores text data in this data object. The format of the text data to store is specified with a member of TextDataFormat. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | CopyingEvent | Identifies the Copying attached event. |
![]() ![]() | PastingEvent | Identifies the Pasting attached event. |
![]() ![]() | SettingDataEvent | Identifies the SettingData attached event. |
| Name | Description | |
|---|---|---|
![]() ![]() | Copying | Occurs when the associated dependency object has prepared appropriate data formats that represent the copy selection, added the copy selection formats to a DataObject, and is ready to either place the DataObject on the Clipboard or begin a drag-and-drop operation. |
![]() ![]() | Pasting | Occurs when the associated dependency object is ready to paste data. |
![]() ![]() | SettingData | Occurs when the associated dependency object attempts to add a new data format to a DataObject. |
| Name | Description | |
|---|---|---|
![]() ![]() | IDataObject::DAdvise(FORMATETC%, ADVF, IAdviseSink^, Int32%) | Creates a connection between a data object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data. |
![]() ![]() | IDataObject::DUnadvise(Int32) | Destroys a notification connection that had been previously established. |
![]() ![]() | IDataObject::EnumDAdvise(IEnumSTATDATA^%) | Creates an object that can be used to enumerate the current advisory connections. |
![]() ![]() | IDataObject::EnumFormatEtc(DATADIR) | |
![]() ![]() | IDataObject::GetCanonicalFormatEtc(FORMATETC%, FORMATETC%) | |
![]() ![]() | IDataObject::GetData(FORMATETC%, STGMEDIUM%) | |
![]() ![]() | IDataObject::GetDataHere(FORMATETC%, STGMEDIUM%) | Obtains data from a source data object. This method, which is called by a data consumer, differs from the GetData method in that the caller must allocate and free the specified storage medium. |
![]() ![]() | IDataObject::QueryGetData(FORMATETC%) | |
![]() ![]() | IDataObject::SetData(FORMATETC%, STGMEDIUM%, Boolean) | Transfers data to the object that implements this method. This method is called by an object that contains a data source. |
Available since 3.0
Silverlight
Available since 4.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





