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.
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
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
‘선언
Public MustInherit Class ShapeField
public abstract class ShapeField
public ref class ShapeField abstract
[<AbstractClass>]
type ShapeField = class end
public abstract class ShapeField
The ShapeField type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ShapeField | Initializes a new instance of the ShapeField class. |
Top
Properties
Name | Description | |
---|---|---|
AnchoringBehavior | Describes how the content of the field should position and size itself in relation to the parent ShapeElement. | |
DefaultAccessibleDescription | Gets or sets the default accessible description. | |
DefaultAccessibleName | Gets or sets the default name of the shape field for the accessible object. | |
DefaultAccessibleState | Gets the default state of the shape field for the accessible object. | |
DefaultBackgroundBrushId | Gets or sets the ID of the default brush to paint the background of the shape field. | |
DefaultFocusable | Gets the shape field and verifies whether it can receive focus, or gives the shape field the ability to receive focus. | |
DefaultInactiveSelectedBackgroundBrushId | Gets or sets the ID of the default background brush for the shape field. | |
DefaultPenId | Gets or sets the ID of the default pen to use for the shape field. | |
DefaultReflectParentFocusedState | Gets the child shape field and verifies whether it should receive focus when its parent shape receives focus or sets the ability to reflect the focus state of its parent shape. | |
DefaultReflectParentSelectedState | Gets the child shape field and verifies whether it should be selected when its parent shape is selected or sets the ability to reflect the selection state of its parent shape. | |
DefaultSelectable | Gets the shape field and verifies whether it can be selected by default or sets the default selection state of the shape field. | |
DefaultSelectedBackgroundBrushId | Gets or sets the ID of the default background brush for the shape field. | |
DefaultVisibility | Gets the shape field and verifies whether it appears by default or sets the default visibility of the shape field. | |
Name | Gets the name of the shape field. |
Top
Methods
Name | Description | |
---|---|---|
AccessibleDoDefaultAction | Performs the default action for the accessible object. | |
AllowInPlaceEditorAutoSize | Enables the in-place editor to be automatically sized in the shape field. | |
AssociateValueWith(Store, AssociatedPropertyInfo) | Associates the shape field with a domain property that is assigned to a shape element. | |
AssociateValueWith(Store, Guid) | Associates the shape field with a domain property that is assigned to a shape element. | |
AssociateValueWith(Store, Guid, AssociatedPropertyInfo) | Associates the shape field with a domain property that is assigned to a shape element. | |
AssociateVisibilityWith(Store, AssociatedPropertyInfo) | Associates the visibility of the shape field with a domain property that is assigned to a shape element. | |
AssociateVisibilityWith(Store, Guid) | Associates the visibility of the shape field with a domain property that is assigned to a shape element. | |
AssociateVisibilityWith(Store, Guid, AssociatedPropertyInfo) | Associates the visibility of the shape field with a domain property that is assigned to a shape element. | |
CanEditValue | Gets the shape field and verifies whether it can be edited. | |
CommitPendingEdit | Commits the pending edit. | |
DoHitTest | Performs a hit test on a specified point in the diagram to determine whether the point is in the bounds of the shape field. | |
DoKeyboardNavigation | Navigates in the shape field by using the keyboard. | |
DoPaint | Draws the shape field. | |
EditValue(ShapeElement, DiagramClientView) | Opens the in-place editor for the shape field. | |
EditValue(ShapeElement, DiagramClientView, PointD) | Opens the in-place editor for the shape field. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindFirstChild | Locates the first child shape field in the parent shape field. | |
FindLastChild | Locates the last child shape field in the parent shape field. | |
FindNextChild | Locates the next child shape field in the parent shape field. | |
FindNextInChildSubFields | Locates the next child shape field in the navigation sequence. | |
FindPreviousChild | Locates the previous child shape field in the parent shape field. | |
FindPreviousInChildSubFields | Locates the previous child shape field in the navigation sequence. | |
Focused | Gets the shape field and verifies whether it has focus. | |
GetAccessibilityObject | Gets the accessibility object that is assigned to the shape field. | |
GetAccessibleChild | Gets the Accessibility object for the child shape field. | |
GetAccessibleChildCount | Gets the number of Accessibility objects that are assigned to the parent shape field and its child shape fields. | |
GetAccessibleDefaultActionDescription | Gets the default purpose of the shape field for the accessible object. | |
GetAccessibleDescription | Gets the description of the shape field for the accessible object. | |
GetAccessibleHelp | Gets the shape field Help for the accessible object. | |
GetAccessibleHelpTopicFileName | Gets a topic in the Help for the accessible object. | |
GetAccessibleHelpTopicId | Gets the ID that is assigned to the Help topic for the accessible object. | |
GetAccessibleName | Gets the name of the shape field for the accessible object. | |
GetAccessibleRole | Gets the role of the shape field for the accessible object. | |
GetAccessibleState | Gets the state of the shape field for the accessible object. | |
GetAccessibleValue | Gets the value in the shape field for the accessible object. | |
GetActiveInPlaceEditor | Gets the in-place editor that is active. | |
GetBackgroundBrush | Gets the brush that draws the background for the shape element to which this shape field is assigned. | |
GetBackgroundBrushId | Gets the ID of the brush that draws the background for the shape element to which this shape field is assigned. | |
GetBounds | Gets the bounds for the shape field. | |
GetCursor | Gets the pointer that appears when the mouse is pointing to the shape field. | |
GetFocusable | Gets the shape field and verifies whether it can receive focus. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetInPlaceEditorBounds | Gets the bounds for the in-place editor. | |
GetMaximumInPlaceEditorSize | Gets the maximum bounds for the in-place editor. | |
GetMinimumInPlaceEditorSize | Gets the minimum bounds for the in-place editor. | |
GetMinimumSize | Gets the minimum width and height for the shape field. | |
GetPen | Gets the pen that draws the shape element to which the shape field is assigned. | |
GetPenId | Gets the ID of the pen that draws the shape element to which the shape field is assigned. | |
GetPotentialMouseAction | Gets the mouse action to activate when the user next clicks a specific point on the diagram. | |
GetSelectable | Gets the shape field and verifies whether it can be selected. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValue | Gets the value in the shape field. | |
GetValueDomainPropertyInfo | Gets the domain property that is assigned to the value in the shape field. | |
GetVisible | Gets the shape field and verifies whether it appears. | |
HasFocusedAppearance | Gets the shape field and verifies whether it should appear to have the focus. | |
HasPendingEdit | Gets the shape field and verifies whether its in-place editor is active and a change is pending. | |
HasSelectedAppearance | Gets the shape field and verifies whether it appears to be selected. | |
IsNavigationKey(Char) | Gets the key that the user pressed and verifies whether it can be used to navigate between shape fields. | |
IsNavigationKey(Keys) | Gets the keys that the user pressed and verifies whether they can be used to navigate between shape fields. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NavigateAscend | Moves the focus to the previous shape field in the navigation sequence for the selected shapes. | |
NavigateDescend | Moves the focus to the next shape field in the navigation sequence for the selected shapes. | |
NavigateToFirst | Moves the focus to the first shape field in the navigation sequence for the selected shapes. | |
NavigateToLast | Moves the focus to the last shape field in the navigation sequence for the selected shapes. | |
NavigateToNext | Moves the focus to the next shape field in the navigation sequence for the selected shapes. | |
NavigateToPrevious | Moves the focus to the previous shape field in the navigation sequence for the selected shapes. | |
OnBeginEdit | Alerts listeners when in-place editing has begun. | |
OnClick | Alerts listeners when the user has clicked a shape field. | |
OnDoubleClick | Alerts listeners when the user has double-clicked a shape field. | |
OnEndEdit | Alerts listeners when in-place editing has completed. | |
OnKeyDown | Alerts listeners when the user has held down a key when pointing to a shape field. | |
OnKeyPress | Alerts listeners when the user has pressed a key when pointing to a shape field. | |
OnKeyUp | Alerts listeners when the user has released a key when pointing to a shape field. | |
OnMouseDown | Alerts listeners when the user is holding down the mouse over a shape field. | |
OnMouseMove | Alerts listeners when the mouse has been moved over a shape field. | |
OnMouseUp | Alerts listeners when the user has released the mouse button over a shape field. | |
OnMouseWheel | Alerts listeners when the mouse has been rotated over a shape field. | |
Selected | Gets the shape field and verifies whether it is selected. | |
SetSelectionRange | Sets the selection to a range of child shape fields. | |
SetValue | Assigns the specified value to a shape field. | |
SetVisible | Sets the visibility of the shape field. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
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.
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 |
---|---|---|
June 2010 |
Extended and clarified descriptions. |
Customer feedback. |