Partager via


Diagram.ShouldAddShapeForElement Method

Verifies whether a shape can have a child shape assigned to it.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

Syntax

'Declaration
Protected Overrides Function ShouldAddShapeForElement ( _
    element As ModelElement _
) As Boolean
protected override bool ShouldAddShapeForElement(
    ModelElement element
)
protected:
virtual bool ShouldAddShapeForElement(
    ModelElement^ element
) override
abstract ShouldAddShapeForElement : 
        element:ModelElement -> bool  
override ShouldAddShapeForElement : 
        element:ModelElement -> bool
protected override function ShouldAddShapeForElement(
    element : ModelElement
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the shape can have the child shape added to it; otherwise, false.

Remarks

This method is called when a user drags a shape onto another shape or copies and pastes a shape onto another shape.

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace