Export (0) Print
Expand All

ShapeField Class

Lightweight object that represents a part of a shape that can display items such as the background image, text decorators, and icon decorators.

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

public abstract class ShapeField

When you define a decorator in a shape, it is represented by a ShapeField. ShapeFields are also used to represent the areas within more complex shapes such as CompartmentShapes.

A Shape Field is an object that manages an area within a shape, such as the space assigned to an image or a label. One ShapeField instance is shared between many shapes of the same class. The shape field instance does not contain the element displayed.

Frequently-used derived classes are TextFieldand ImageField.

A shape field can have subfields, represented by ShapeSubField.

For examples of the initialization of ShapeFields, inspect InitializeShapeFields() in Dsl\GeneratedCode\Shapes.cs in your DSL solution. This method is called once for each shape class. You can customize the shape fields of a shape class by overriding InitializeShapeFields().

For examples, see TextField and ImageField.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Date

History

Reason

Extended and clarified descriptions.

Customer feedback.

Community Additions

ADD
Show:
© 2015 Microsoft