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 | System.String | The desired format. |
Returns
- System.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 | System.String | The desired data format. |
Returns
- System.Boolean:
true
if there is data available in the specified format; otherwise,false
.
GetText()
Gets text from the data store.
string GetText()
Returns
- System.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 | System.String | The data format. |
data | System.Object | The data value. |
SetText(String, DataStoreTextKind)
Sets text into the data store.
void SetText(string text, DataStoreTextKind textKind)
Parameter | Type | Description |
---|---|---|
text | System.String | The text to set. |
textKind | DataStoreTextKind | A DataStoreTextKind indicating the kind of text. |
ToDataObject()
Returns a native System.Windows.IDataObject containing the data within this data store.
IDataObject ToDataObject()
Returns
- System.Windows.IDataObject:
A native System.Windows.IDataObject containing the data within this data store.