In This Article

IDataStore Interface

Defines the base requirements for an object that can be used to wrap access of data for clipboard and drag/drop operations.

public interface IDataStore

Properties

TextKind

Gets the kind of text within this data store.

DataStoreTextKind TextKind { get; }

Property Value

DataStoreTextKind:

The kind of text within this data store.

Methods

GetData(string)

Gets data from the data store.

object GetData(string format)
Parameter Type Description
format string

The desired format.

Returns

object:

The data in the data store.

GetDataPresent(string)

Returns whether there is data available in the specified format.

bool GetDataPresent(string format)
Parameter Type Description
format string

The desired data format.

Returns

bool:

true if there is data available in the specified format; otherwise, false.

GetText()

Gets text from the data store.

string GetText()

Returns

string:

The text in the data store.

SetData(string, object)

Sets data on the data object.

void SetData(string format, object data)
Parameter Type Description
format string

The data format.

data object

The data value.

SetText(string, DataStoreTextKind)

Sets text into the data store.

void SetText(string text, DataStoreTextKind textKind)
Parameter Type Description
text string

The text to set.

textKind DataStoreTextKind

A DataStoreTextKind indicating the kind of text.

ToDataObject()

Returns a native IDataObject containing the data within this data store.

IDataObject ToDataObject()

Returns

IDataObject:

A native IDataObject containing the data within this data store.