Name
IDataObject
Synopsis
This interface is used by Clipboard
and
drag-and-drop operations to encapsulate the data that is being moved
around. See DataObject
for a description of a
typical implementation.
You could provide more complex IDataObject
implementations than the simple in-memory version offered by
DataObject
, perhaps using persistent storage for
robustness, but DataObject
will do fine for most
applications.
public interface IDataObject { // Public Instance Methods public object GetData(string format); public object GetData(string format, bool autoConvert); public object GetData(Type format); public bool GetDataPresent(string format); public bool GetDataPresent(string format, bool autoConvert); public bool GetDataPresent(Type format); public string[ ] GetFormats(); public string[ ] GetFormats(bool autoConvert); public void SetData(object data); public void SetData(string format, bool autoConvert, object data); public void SetData(string format, object data); public void SetData(Type format, object data); }
Implemented By
DataObject
Returned By
Clipboard.GetDataObject()
,
DragEventArgs.Data
Passed To
DragEventArgs.DragEventArgs()
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.