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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

public:
static ShapeField^ FindShapeField(
	IList<ShapeField^>^ shapeFields,
	String^ fieldName
)

Parameters

shapeFields
Type: System.Collections.Generic::IList<ShapeField^>^

The shape fields in which to search.

fieldName
Type: System::String^

The name of the shape field.

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.

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);
}
Return to top
Show: