How to: Add a Swimlane to a Domain-Specific Language Definition
Swimlanes are areas on the generated designer that are separated by horizontal or vertical lines. You can define other shapes to be contained in swimlanes. For more information, see Swimlane (Domain-Specific Language Designer).
After you create and define a swimlane, you must map it to a domain class or another swimlane. For more information, see How to: Add a Domain Class to a Domain-Specific Language Definition and How to: Map Elements with the Diagram Element Map Tool.
The Task Flow Diagram sample demonstrates the use of a swimlane. For more information, see Task Flow Diagram Sample.
To add a swimlane to a domain-specific language definition
In the Toolbox, on the Dsl Designer tab, drag a swimlane onto the diagram surface of the Domain-Specific Language Designer.
A swimlane that is named Swimlane1 appears in the designer definition under the Diagram Elements swimlane.
Optionally, add decorators, such as text and an icon, to the swimlane. For more information, see How to: Add a Decorator.
Optionally, add domain properties to the swimlane. For more information, see How to: Add a Domain Property.
Set any properties in the Properties window.
For example, you can change the default value of the Separator Line property from dash to solid and the Alignment property from vertical to horizontal.
Map the swimlane to the domain class using the Diagram Element Map tool. For more information, see How to: Map Elements with the Diagram Element Map Tool.
Click Transform All Templates in Solution Explorer.
On the Build menu, click Rebuild Solution to start a Visual Studioexperimental build to display how the swimlane has been defined and mapped to a domain class.
In the generated designer, right-click the mapped swimlane's header, and click Add After or Add Before to insert additional swimlanes.
See Also
Concepts
Domain-Specific Language Designer Terminology Overview