SwimlaneShape.ShouldTryParentShapeForMergeOnToolboxDoubleClick Property
If true, when the user double-clicks an element tool while this shape is selected, and if the tool cannot be merged with this shape, then a merge with the parent shape will be attempted.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)
Syntax
'Declaration
Public Overrides ReadOnly Property ShouldTryParentShapeForMergeOnToolboxDoubleClick As Boolean
public override bool ShouldTryParentShapeForMergeOnToolboxDoubleClick { get; }
public:
virtual property bool ShouldTryParentShapeForMergeOnToolboxDoubleClick {
bool get () override;
}
abstract ShouldTryParentShapeForMergeOnToolboxDoubleClick : bool with get
override ShouldTryParentShapeForMergeOnToolboxDoubleClick : bool with get
override function get ShouldTryParentShapeForMergeOnToolboxDoubleClick () : boolean
Property Value
Type: Boolean
A quick way for a user of your DSL to create several elements is to repeatedly double-click a toolbox item. For example, in a DSL created using the Task Flow solution template, you can place several swimlanes on the diagram by repeatedly double-clicking the swimlane tool.
Normally, double-clicking a tool creates a new item as a child of the selected element. For example, if you select a component and double-click the Input Port tool, a new port is created on the selected component. When the operation ends, the new item is selected. This presents a difficulty: if the user now double-clicks the Output Port tool, nothing should happen, because an Output Port cannot have an Input Port as its parent. However, if ShouldTryParentShapeForMergeOnToolboxDoubleClick returns true, a new port will be added to the parent component instead.
This property defaults to true, but you can override its definition in your shape class.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.