Interface IDataTransferService
Defines the service managing the data transfer for copy/paste and dragdrop.
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
System.IO.Stream
imageStream
The image stream. |
Returns
System.Windows.Controls.Image
|
CreateShapeFromImage(Image)
Returns a wrapping shape from a given image.
Declaration
IShape CreateShapeFromImage(Image image)
Parameters
System.Windows.Controls.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
void HandleDrop(DataObject dataObject, Action<DataTransferResult> fileDropAction, Action<DataTransferResult> elementDropAction)
Parameters
System.Windows.DataObject
dataObject
The data object being transferred. |
System.Action<DataTransferResult>
fileDropAction
The file drop action which will handle the result of the external data transfer. |
System.Action<DataTransferResult>
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
System.Windows.DataObject
dataObject
The data object being transferred. |
System.Action<DataTransferResult>
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
bool TryGetDiagramSerializationInfo(string diagramXML, ref SerializationInfo serializationInfo)
Parameters
System.String
diagramXML
The diagram XML. |
SerializationInfo
serializationInfo
The serialization info. |
Returns
System.Boolean
|