Share via


How to: Add a Decorator

A decorator is a visual item that appears on an object, such as a shape or a connector, in a generated designer. You can use decorators to add labels, icons, and chevrons to an element, and you can add multiple decorators to each object. For more information about the types of decorators that are available and their properties, see Decorator (Domain-Specific Language Designer).

To add a decorator to an element in a diagram

  1. In the Diagram Elements swimlane, right-click the name of the object in the diagram.

  2. Click Add, and then select one of the following check boxes:

    • ExpandCollapseDecorator

    • IconDecorator

    • TextDecorator

    The decorator is added to the element and appears under the element's Decorator node in DSL Explorer.

  3. In the Properties window, modify the properties of the decorator to meet your requirements.

To add a decorator to an element in DSL Explorer

  1. In DSL Explorer, expand the Connectors or Shapes node.

  2. Right-click the object, and then select one of the following check boxes:

    • Add New ExpandCollapseDecorator

    • Add New IconDecorator

    • Add New TextDecorator

    The decorator appears under the element's Decorator node and is added to the element in the diagram.

  3. In the Properties window, modify the properties of the decorator to meet your requirements.

See Also

Concepts

Decorator (Domain-Specific Language Designer)

How to: Intercept a Click on an Icon Decorator

Domain-Specific Language Tools Glossary