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)
Syntax
'Declaration
Public MustInherit Class ShapeField
'Usage
Dim instance As ShapeField
public abstract class ShapeField
public ref class ShapeField abstract
public abstract class ShapeField
Remarks
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().
Examples
For examples, see TextField and ImageField.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.Diagrams.ShapeField
Microsoft.VisualStudio.Modeling.Diagrams.AreaField
Microsoft.VisualStudio.Modeling.Diagrams.ImageField
Microsoft.VisualStudio.Modeling.Diagrams.ListField
Microsoft.VisualStudio.Modeling.Diagrams.ShapeAutoInvalidator
Microsoft.VisualStudio.Modeling.Diagrams.TextField
Microsoft.VisualStudio.Modeling.Diagrams.ToggleButtonField
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.Modeling.Diagrams Namespace
Change History
Date |
History |
Reason |
---|---|---|
Extended and clarified descriptions. |
Customer feedback. |