InterfaceIDataTransferService
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:
public interface IDataTransferService
Methods
CreateImage(Stream)
The transformation of image stream data to an image.
Declaration
Image CreateImage(Stream imageStream)
Parameters
imageStream
The image stream.
Returns
Image
CreateShapeFromImage(Image)
Returns a wrapping shape from a given image.
Declaration
IShape CreateShapeFromImage(Image image)
Parameters
image
Image
The image to wrap.
Returns
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
void HandleDrop(DataObject dataObject, Action<DataTransferResult> fileDropAction, Action<DataTransferResult> elementDropAction)
Parameters
dataObject
DataObject
The data object being transferred.
fileDropAction
The file drop action which will handle the result of the external data transfer.
elementDropAction
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
void HandlePaste(DataObject dataObject, Action<DataTransferResult> action)
Parameters
dataObject
DataObject
The data object being transferred.
action
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
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")]
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
bool TryGetDiagramSerializationInfo(string diagramXML, ref SerializationInfo serializationInfo)
Parameters
diagramXML
The diagram XML.
serializationInfo
The serialization info.
Returns