New to Telerik UI for WinFormsStart a free 30-day trial

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

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface IDataTransferService

Derived Classes: DataTransferService

Methods

The transformation of image stream data to an image.

C#
Image CreateImage(Stream imageStream)
Parameters:imageStreamStream

The image stream.

Returns:

Image

Returns a wrapping shape from a given image.

C#
IShape CreateShapeFromImage(Image image)
Parameters:imageImage

The image to wrap.

Returns:

IShape

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).

C#
void HandleDrop(DataObject dataObject, Action<DataTransferResult> fileDropAction, Action<DataTransferResult> elementDropAction)
Parameters:dataObjectDataObject

The data object being transferred.

fileDropActionAction<DataTransferResult>

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

elementDropActionAction<DataTransferResult>

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

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

C#
void HandlePaste(DataObject dataObject, Action<DataTransferResult> action)
Parameters:dataObjectDataObject

The data object being transferred.

actionAction<DataTransferResult>

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

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

C#
bool TryGetDiagramSerializationInfo(string diagramXML, ref SerializationInfo serializationInfo)
Parameters:diagramXMLstring

The diagram XML.

serializationInfoSerializationInfo

The serialization info.

Returns:

bool