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.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.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
shapeFields
Type: IList<ShapeField>The shape fields in which to search.
fieldName
Type: StringThe 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.
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
- 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.