This topic has not yet been rated - Rate this topic

ShapeElement.CreateChildShape Method

Creates a shape and adds it as a child to this shape.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
protected virtual ShapeElement CreateChildShape(
	ModelElement element
)

Parameters

element
Type: Microsoft.VisualStudio.Modeling.ModelElement
The domain class instance which the shape is to represent.

Return Value

Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement
The new child shape.

You can override this method to create customized links and additional shapes.

For more information, see FixUpChildShapes(ModelElement).

protected override DslDiagrams::ShapeElement CreateChildShape(DslModeling::ModelElement element)
{
if(element is global::Fabrikam.DSL.TestValidation.ParentRelation)
{
return new global::Fabrikam.DSL.TestValidation.ParentConnector(this.Partition);
}
if(element is global::Fabrikam.DSL.TestValidation.Person)
{
return new global::Fabrikam.DSL.TestValidation.PersonShape(this.Partition);
}
return base.CreateChildShape(element);
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ