Interface
IDragPayload

Provides a format independent mechanism for transferring data.

Definition

Namespace:Telerik.Windows.DragDrop.Behaviors

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public interface IDragPayload

Properties

DataConverter

Gets a IDataConverter for providing additional formats the data to be converted to.

Declaration

cs-api-definition
DataConverter DataConverter { get; }

Property Value

DataConverter

Methods

GetData(Type)

Retrieves a data object in a specified format; the data format is specified by a Type object.

Declaration

cs-api-definition
object GetData(Type format)

Parameters

format

Type

A Type object that specifies the format in which to retrieve the data. See the class for a set of predefined data formats.

Returns

object

A data object that has the data in the specified format; or null, if the data is not available in the specified format.

GetData(string)

Retrieves a data object in a specified format; the data format is specified by a string.

Declaration

cs-api-definition
object GetData(string format)

Parameters

format

string

A string that specifies the format in which to retrieve the data. See the class for a set of predefined data formats.

Returns

object

A data object that has the data in the specified format; or null, if the data is not available in the specified format.

GetData(string, bool)

Retrieves a data object in a specified format, and optionally, converts the data to the specified format.

Declaration

cs-api-definition
object GetData(string format, bool autoConvert)

Parameters

format

string

A string that specifies the format in which to retrieve the data. See the class for a set of predefined data formats.

autoConvert

bool

True to attempt to automatically convert the data to the specified format; false to perform no data format conversion.If this parameter is false, the method returns data in the specified format if it is available; or returns null if the data is not available in the specified format.

Returns

object

A data object that has the data in the specified format; or null, if the data is not available in the specified format.

GetDataPresent(Type)

Checks to see whether the data is available in, or can be converted to, a specified format. The data format is specified by a Type object.

Declaration

cs-api-definition
bool GetDataPresent(Type format)

Parameters

format

Type

A Type that specifies the format to check for.

Returns

bool

True if the data is in, or can be converted to, the specified format; otherwise, false.

GetDataPresent(string)

Checks whether the data is available in, or can be converted to, a specified format; the data format is specified by a string.

Declaration

cs-api-definition
bool GetDataPresent(string format)

Parameters

format

string

A string that specifies the format to check for. See the class for a set of predefined data formats.

Returns

bool

True if the data is in, or can be converted to, the specified format; otherwise, false.

GetDataPresent(string, bool)

Checks whether the data is available in, or can be converted to, a specified format. If the data is not already available in the specified format, a Boolean flag indicates whether to check if the data can be converted to the specified format.

Declaration

cs-api-definition
bool GetDataPresent(string format, bool autoConvert)

Parameters

format

string

A string that specifies the format to check for. See the class for a set of predefined data formats.

autoConvert

bool

False to only check for the specified format; true to also check whether the data that is stored in this data object can be converted to the specified format.

Returns

bool

True if the data is in, or can be converted to, the specified format; otherwise, false.

GetFormats()

Returns a list of all formats that the data in this data object is stored in, or can be converted to.

Declaration

cs-api-definition
string[] GetFormats()

Returns

string[]

An array of strings, with each string specifying the name of a format that is supported by this data object.

GetFormats(bool)

Returns a list of all formats that the data in this data object is stored in. A Boolean flag indicates whether to also include formats that the data can be automatically converted to.

Declaration

cs-api-definition
string[] GetFormats(bool autoConvert)

Parameters

autoConvert

bool

True to retrieve all formats that the data in this data object is stored in, or can be converted to; false to retrieve only the formats in which the data in this data object is stored (excludes formats that the data is not stored in, but can be automatically converted to).

Returns

string[]

An array of strings, with each string specifying the name of a format that is supported by this data object.

SetData(Type, object)

Stores the specified data in this data object, using one or more specified data formats. The data format is specified by a Type class.

Declaration

cs-api-definition
void SetData(Type format, object data)

Parameters

format

Type

A Type that specifies the format in which to store the data.

data

object

The data to store in this data object.

SetData(object)

Stores the specified data in this data object, and automatically converts the data format from the source object type.

Declaration

cs-api-definition
void SetData(object data)

Parameters

data

object

The data to store in this data object.

SetData(string, object)

Stores the specified data in this data object, using one or more specified data formats. The data format is specified by a string.

Declaration

cs-api-definition
void SetData(string format, object data)

Parameters

format

string

A string that specifies the format in which to store the data. See the class for a set of predefined data formats.

data

object

The data to store in this data object.

SetData(string, object, bool)

Stores the specified data in this data object, using one or more specified data formats. This overload includes a Boolean flag to indicate whether the data may be converted to another format on retrieval.

Declaration

cs-api-definition
void SetData(string format, object data, bool autoConvert)

Parameters

format

string

A string that specifies the format in which to store the data. See the class for a set of predefined data formats.

data

object

The data to store in this data object.

autoConvert

bool

True to allow the data to be converted to another format on retrieval; false to prohibit the data from being converted to another format on retrieval.