Interface
IDataTransferService

Defines the service managing the data transfer for copy/paste and dragdrop.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public interface IDataTransferService

Methods

CreateImage(Stream)

The transformation of image stream data to an image.

Declaration

cs-api-definition
Image CreateImage(Stream imageStream)

Parameters

imageStream

Stream

The image stream.

Returns

Image

CreateShapeFromImage(Image)

Returns a wrapping shape from a given image.

Declaration

cs-api-definition
IShape CreateShapeFromImage(Image image)

Parameters

image

Image

The image to wrap.

Returns

IShape

HandleDrop(DataObject, Action<DataTransferResult>, Action<DataTransferResult>)

Handles the transfer of data when there is a dragdrop action. This can be both an internal dragdrop (from one control to another within the same application) as well as an external dragdrop (from one application to another or from the file system to an application).

Declaration

cs-api-definition
void HandleDrop(DataObject dataObject, Action<DataTransferResult> fileDropAction, Action<DataTransferResult> elementDropAction)

Parameters

dataObject

DataObject

The data object being transferred.

fileDropAction

Action<DataTransferResult>

The file drop action which will handle the result of the external data transfer.

elementDropAction

Action<DataTransferResult>

The element drop action which will handle the result of the internal data transfer.

HandlePaste(DataObject, Action<DataTransferResult>)

Handles the transfer of data when a copy-paste or cut-paste was performed.

Declaration

cs-api-definition
void HandlePaste(DataObject dataObject, Action<DataTransferResult> action)

Parameters

dataObject

DataObject

The data object being transferred.

action

Action<DataTransferResult>

The action which will handle the result of the clipboard data transfer.

TryGetDiagramSerializationInfo(string, ref SerializationInfo)

Attempts to fetch the SerializationInfo from the string which supposedly contains a serialized diagram as XML.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")]
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
bool TryGetDiagramSerializationInfo(string diagramXML, ref SerializationInfo serializationInfo)

Parameters

diagramXML

string

The diagram XML.

serializationInfo

SerializationInfo

The serialization info.

Returns

bool