Share via


ShapeElement.FindShapeField Method (IList<ShapeField>, String)

Searches for a shape field in a shape.

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

Syntax

'Declaration
Public Shared Function FindShapeField ( _
    shapeFields As IList(Of ShapeField), _
    fieldName As String _
) As ShapeField
public static ShapeField FindShapeField(
    IList<ShapeField> shapeFields,
    string fieldName
)
public:
static ShapeField^ FindShapeField(
    IList<ShapeField^>^ shapeFields, 
    String^ fieldName
)
static member FindShapeField : 
        shapeFields:IList<ShapeField> * 
        fieldName:string -> ShapeField 
public static function FindShapeField(
    shapeFields : IList<ShapeField>, 
    fieldName : String
) : ShapeField

Parameters

Return Value

Type: Microsoft.VisualStudio.Modeling.Diagrams.ShapeField
The first shape field that has the specified name; otherwise, null, if no shape field is found.

Examples

protected override void InitializeDecorators(global::System.Collections.Generic.IList<DslDiagrams::ShapeField> shapeFields, global::System.Collections.Generic.IList<DslDiagrams::Decorator> decorators)
{
base.InitializeDecorators(shapeFields, decorators);

DslDiagrams::ShapeField field1 = DslDiagrams::ShapeElement.FindShapeField(shapeFields, "Title");
DslDiagrams::Decorator decorator1 = new DslDiagrams::ShapeDecorator(field1, DslDiagrams::ShapeDecoratorPosition.InnerTopCenter, DslDiagrams::PointD.Empty);
decorators.Add(decorator1);
}

.NET Framework Security

See Also

Reference

ShapeElement Class

FindShapeField Overload

Microsoft.VisualStudio.Modeling.Diagrams Namespace