Partager via


Controlling Color, Line Style, and other Shape Properties

To allow the user to control the color, line width, and other properties of a shape, connector, or diagram, you can expose these features as domain properties. The user can then update these properties and you can set them in program code.

To expose a style property

  • On the DSL Definition diagram, right-click a shape, connector or diagram class.

    Point to Add Exposed, and then click the required style feature.

    A new domain property is added to the class, through which the style feature can be controlled.

See Also

Concepts

Defining Shapes and Connectors

Setting a Background Image on a Diagram

Navigating and Updating a Model in Program Code

Other Resources

Writing Code to Customise a Domain-Specific Language

Change History

Date

History

Reason

March 2011

Separated from parent topic.

Added samples.

Information enhancement.