Writing User Commands and Actions
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. 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.
User actions
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.