Share via


Defining Domain Properties

By adding ___domain properties to a ___domain class, you can generate properties in the generated ___domain class. The added properties are displayed in the ___domain class, in the Domain Properties compartment. They can also be displayed in the generated Properties window and the generated DSL Explorer, and can be mapped to decorators on the design surface.

Adding Domain Properties

Add a ___domain property by right-clicking the ___domain class in the diagram, pointing to Add, and then clicking Domain Property. In the DSL Explorer, you can right-click the ___domain class, and then click Add New Domain Property.

Setting the Type of a Domain Property

To set the type of a ___domain property, select the Type property in the Properties window. A drop-down list displays the available types. For example, an Age property can have a type of Int32, and a Description property can have a type of String.

Calculated Domain Properties

Calculated ___domain properties are properties that have values that are calculated from the values of other ___domain properties or elements. To set up a calculated ___domain property, in the Properties window, set the Kind property to Calculated. You must then implement a GetXValue() method (where X is the name of the calculated property) in the class to which the property belongs. If you do not implement this method, the project will not compile. To enable the value to be set correctly, you must also implement the NotifyValueChange method. For more information about notifications, see Responding to Changes in the Model.

See Also

Reference

Properties of Domain Properties

Other Resources

Domain-Specific Language Tools Glossary

Change History

Date

History

Reason

July 2008

Rewrote and refactored project.

Content bug fix.