Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
ShapeElement Class
 InitializeShapeFields Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Domain-Specific Language Tools Reference
ShapeElement.InitializeShapeFields Method

Initializes the fields assigned to the shape.

Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams (in microsoft.visualstudio.modeling.diagrams.dll)

Visual Basic (Declaration)
Protected Overridable Sub InitializeShapeFields ( _
	shapeFields As IList(Of ShapeField) _
)
Visual Basic (Usage)
Dim shapeFields As IList(Of ShapeField)

Me.InitializeShapeFields(shapeFields)
C#
protected virtual void InitializeShapeFields (
	IList<ShapeField> shapeFields
)
C++
protected:
virtual void InitializeShapeFields (
	IList<ShapeField^>^ shapeFields
)
J#
protected void InitializeShapeFields (
	IList<ShapeField> shapeFields
)
JScript
protected function InitializeShapeFields (
	shapeFields : IList<ShapeField>
)

Parameters

shapeFields

The fields assigned to the shape.

You can override this method to add text, images, and other fields to the shape. Text can be added by initializing a text field (TextField), and images, by initializing an image field (ImageField). Both text fields and image fields are derived from the shape field (ShapeField).

C#
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);
}
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker