DekGenius.com
[ Team LiB ] Previous Section Next Section

IDataObject

System.Windows.Forms (system.windows.forms.dll)interface

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()

    [ Team LiB ] Previous Section Next Section