Writing User Commands and Actions
This article applies to Visual Studio 2015. If you're looking for Visual Studio 2017 documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2017. Download it here.
You can customize a domain-specific language by adding commands to the diagram, and by responding to gestures such as drag-and-drop, click, and double-click events.
How to: Modify a Standard Menu Command – You can customize the behavior of commands such as copy and print.
How to: Add a Command to the Shortcut Menu – Create your own commands that can update your model or external resources.
How to: Add a Drag-and-Drop Handler – Allow the user to move items from one diagram to another, including UML diagrams. You can store references to one model in another.
How to: Intercept a Click on a Shape or Decorator – Allow your user to click through from an item to another item that it references.
How to: Program Copy and Paste Behavior - redirect – How to use ElementOperations.