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
The kind of text within this data store.
Methods
GetData(string)
Gets data from 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:
trueif there is data available in the specified format; otherwise,false.
GetText()
Gets text from 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.