In previous versions of the DslTools, when you wanted to export a selection to an image, or to the Clipboard, you had to write some custom code, or just take a screen copy of what you wanted.
From the VS2010 DSL SDK, the copy/paste as an image is available to all the new designers, and it’s easy to provide the feature for migrated existing designers.
If you create a new graphical designer, you don’t need to do anything, the copy/paste is enabled by default.
If you migrated an existing designer, you can benefit from this new feature very simply:
The user will now be able to select the shapes and connectors he wants to copy, use the standard Copy (Ctrl+C) command, and paste the corresponding image to any application (for instance Paint or Word). The selection is copied in two different image formats:
In most applications you can use the “Paste Special …” command to
There are a few extensions points related to this feature (namely in methods accessible from the ElementOperation property of the Diagram. They are beyond the scope of this blog entry, and will be the subject of a future post.