Edit this page

Clipboard Operations

RadDiagram gives you the ability to Cut, Copy and Paste RadDiagramItems within an application or from WPF to Silverlight 5 application and vice versa.

Please note that the examples in this tutorial are showcasing Telerik Windows8 theme. In the Setting a Theme article you can find more information on how to set an application-wide theme.

AllowCopy, AllowCut, AllowPaste

By default, the AllowCopy, AllowCut and AllowPaste properties are set to True but you can set then to False in order to disable these Clipboard operations.

Cut, Copy, Paste with Keyboard

In order to Cut, Copy or Paste particular RadDiagramItems you have to select them and use the standard keyboard combinations:

  • (Ctrl + C) - copies the selected items.

  • (Ctrl + X) - cuts the selected items.

  • (Ctrl + V) - pastes the selected items.

You can perform these operations in a single WPF or SL 5 application but you can also copy/cut and paste items from WPF to SL 5 and vice versa.

Below you can see three shapes copied from SL 5 application and pasted in WPF 4 application: raddiagram-clipboardoperations

Cut, Copy, Paste with DiagramCommands

You can use the DiagramCommands "Cut", "Copy" and "Paste" in order to perform the standard clipboard operations.

For more information on this, please check out the Commands article.

Copy Shapes from Visio, MSOffice and more...

With the Q3 2012 release, we introduced a built-in feature in the Diagramming framework, that allows you to copy shapes from Visio and paste them directly onto the Diagramming surface.

Please have in mind that the true Visio XML format pasted on the clipboard describes an object model which has nothing in common with the RadDiagram object model. This is why we implemented this feature by using an image format to read the clipboard data and paste a RadDiagramShape containing the clipboard image onto the WPF RadDiagram surface.

Furthermore, you can now copy any portion of MicrosoftOffice data or part of a Photoshop image and paste it directly onto the Diagramming surface. You can also copy an xml representing RadDiagram elements and as soon as you paste it onto your RadDiagram, the elements will be deserialized and automatically generated on the surface.

See Also