ShapeElement Class
Represents a diagram or a shape or connector in a diagram. ShapeElements encapsulate the visual presentation of model elements.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.ModelElement
Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement
Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement
Microsoft.VisualStudio.Modeling.Diagrams.LinkShape
Microsoft.VisualStudio.Modeling.Diagrams.NodeShape
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
声明
<DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.DisplayName", _
GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
<DomainObjectIdAttribute("ffb3d9f5-7a47-4e12-8501-0055bd018825")> _
<DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.Description", _
GetType(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")> _
<DomainModelOwnerAttribute(GetType(CoreDesignSurfaceDomainModel))> _
<CLSCompliantAttribute(True)> _
Public MustInherit Class ShapeElement _
Inherits PresentationElement _
Implements IGeometryHost
[DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.DisplayName",
typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainObjectIdAttribute("ffb3d9f5-7a47-4e12-8501-0055bd018825")]
[DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.Description",
typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainModelOwnerAttribute(typeof(CoreDesignSurfaceDomainModel))]
[CLSCompliantAttribute(true)]
public abstract class ShapeElement : PresentationElement,
IGeometryHost
[DisplayNameResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.DisplayName",
typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainObjectIdAttribute(L"ffb3d9f5-7a47-4e12-8501-0055bd018825")]
[DescriptionResourceAttribute(L"Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.Description",
typeof(CoreDesignSurfaceDomainModel), L"Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")]
[DomainModelOwnerAttribute(typeof(CoreDesignSurfaceDomainModel))]
[CLSCompliantAttribute(true)]
public ref class ShapeElement abstract : public PresentationElement,
IGeometryHost
[<AbstractClass>]
[<DisplayNameResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.DisplayName",
typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")>]
[<DomainObjectIdAttribute("ffb3d9f5-7a47-4e12-8501-0055bd018825")>]
[<DescriptionResourceAttribute("Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.Description",
typeof(CoreDesignSurfaceDomainModel), "Microsoft.VisualStudio.Modeling.Diagrams.GeneratedCode.DomainModelResx")>]
[<DomainModelOwnerAttribute(typeof(CoreDesignSurfaceDomainModel))>]
[<CLSCompliantAttribute(true)>]
type ShapeElement =
class
inherit PresentationElement
interface IGeometryHost
end
public abstract class ShapeElement extends PresentationElement implements IGeometryHost
The ShapeElement type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ShapeElement | Initializes a new instance of the ShapeElement class. |
Top
Properties
Name | Description | |
---|---|---|
AbsoluteBoundingBox | The bounding rectangle, measured relative to the Diagram. | |
AbsoluteBoundingBoxToEnsureVisible | Gets the absolute bounding rectangle for DiagramClientView.EnsureVisible. | |
AbsoluteCenter | Gets the point in the center of the shape. | |
AccessibilityObject | Gets the accessibility object for the shape. | |
AccessibleDefaultActionDescription | Gets the default action description for the shape. | |
AccessibleDescription | Gets the description for the shape. | |
AccessibleHelp | Gets the Help for the shape. | |
AccessibleHelpTopicFileName | Gets the Help topic for the shape. | |
AccessibleHelpTopicId | Gets the ID of the Help topic for the shape. | |
AccessibleName | Gets the name of the shape. | |
AccessibleRole | Gets the role of the shape. | |
AccessibleState | Gets the state of the shape. | |
AccessibleValue | Gets the value of the shape. | |
AllowsChildrenInSelection | If true, the children of this shape can be included in the current selection group. | |
AllowsChildrenToResizeParent | true if this shape can be resized when the size or position of a child shape is changed. | |
AllowsChildrenToShrinkParent | If true, this shape will reduce in size to fit around its children when they are re-sized or moved. | |
BackgroundBrushId | Gets the ID for the brush that is used to paint the background of the shape. | |
BoundingBox | The bounding rectangle, measured relative to the ParentShape. | |
CanFocus | Gets the shape and verifies whether it can receive the focus. | |
CanMove | Gets the shape and verifies whether a user can move it. | |
CanSelect | Gets the shape and verifies whether a user can select it. | |
Center | Gets the point in the center of the shape. | |
ClassStyleSet | Gets the style set for the shape. | |
ClipWhenDrawingFields | Gets the child shape and verifies whether its clipping region should be set to the bounding box for the parent shape when the child shape is drawn. | |
Decorators | Gets the collection of decorators for the shape. | |
DefaultShapeField | Gets the default shape, which is the first shape that can receive focus. | |
DefaultSize | Gets the default size of the shape. | |
Diagram | Gets the diagram to which the shape belongs. | |
EnsureVisiblePreference | Preferences for the EnsureVisible method for this Shape. Default value is to return the VisiblePreference for the Diagram hosting this Shape. | |
Events | Gets the list of event handlers for the shape. | |
GeometryBackgroundBrushId | Gets the ID of the brush that is used to paint the background of the geometry. | |
GeometryBoundingBox | Gets the bounding box of the shape. | |
GeometryHasFilledBackground | Gets the shape and verifies whether its background is painted. | |
GeometryHasOutline | Gets the shape and verifies whether it has an outline. | |
GeometryHasShadow | true if the shape has a shadow; otherwise, false. | |
GeometryOutlinePenId | Gets the ID of the pen that draws the outline for the shape. | |
GeometryStyleSet | Gets the style set for the shape. | |
GridSize | If non-zero, this shape and its children will snap to a grid of this size. Defaults to ParentShape.GridSize. | |
HasChildren | true if the shape has child shapes. | |
HasCustomToolTip | Gets the shape and verifies whether it has a custom tooltip. | |
HasDragOverToolTip | Gets the shape and verifies whether it has a tooltip. | |
HasFilledBackground | Gets the shape and verifies whether it has a background. | |
HasHighlighting | Gets the shape and verifies whether it is highlighted. | |
HasOutline | Gets the shape and verifies whether it has an outline. | |
HasShadow | Gets the shape and verifies whether it has a shadow. | |
HasToolTip | Gets the shape and verifies whether it has a tooltip. | |
Id | Gets the ID of the element. (Inherited from ModelElement.) | |
IsActive | Gets the IsActive flag and verifies to see whether the element is active. (Inherited from ModelElement.) | |
IsDeleted | Gets the IsDeleted flag and checks to see whether the element has been deleted from the model. (Inherited from ModelElement.) | |
IsDeleting | Gets the IsDeleting flag and verifies whether the element is currently being deleted from the model. (Inherited from ModelElement.) | |
IsNestedChild | true if this shape element is in the NestedChildShapes of its ParentShape. | |
IsRelativeChild | true if this shape element is in the RelativeChildShapes of its ParentShape. | |
IsVisible | If true, the shape appears on the diagram; if false, it does not appear, and layout and routing algorithms ignore it. See also Hide() and Show(). | |
LineAdjustAwayDefault | Gets the shape and verifies whether child link shapes should try to align when they are connected to same shape or sets this value. | |
LineAffinityDefault | Gets or sets the target location where the link shape should try to position the shape. | |
LineToLineClearance | Gets or sets the distance between child link shapes for this shape. | |
LineToNodeClearance | Gets or sets the distance between child link shapes and child node shapes. | |
MaximumShadowOffset | Gets the maximum offset for the shadow of the shape. | |
MaximumSize | Gets the maximum size for the shape. | |
MinimumSize | Gets the minimum size for the shape. | |
ModelElement | Gets or sets the model element that is associated with the presentation element. (Inherited from PresentationElement.) | |
NestedChildShapes | The list of shapes that are part of this shape, and are constrained to appear within the boundaries of this shape or diagram. | |
NestedShapesMargin | Gets the margin between the shape's bounding box and its nested node shapes. | |
NodeToNodeClearance | Gets or sets the margin between child node shapes. | |
OutlinePenId | Gets the ID of the pen that is used to draw the outline of the shape. | |
OutlinePenWidth | Gets the width of the outline for the shape. | |
PaintMoveableDecoratorSelectionLines | ||
ParentLink | Gets the relationship instance from the shape to the parent shape. | |
ParentShape | Gets the parent shape element. To appear on a diagram, a shape or connector must have a parent. | |
Partition | Gets or sets the Partition that contains the element. (Inherited from ModelElement.) | |
Perimeter | Gets the perimeter (path) around the shape. | |
RelatedShapeToEmphasize | Gets the related shape to visually emphasize to the user when this shape is selected. | |
RelativeChildShapes | The list of shapes that are part of this shape, but can appear outside the boundaries of this shape. | |
ShapeFields | Parts of a shape such as text rows and decorators. | |
ShapeGeometry | Gets the geometry for the shape, such as Rectangle, RoundedRectangle, or Ellipse, which defines operations associated with the outline of the shape. | |
ShouldTryParentShapeForMergeOnToolboxDoubleClick | If true, when the user double-clicks a toolbox item with this shape selected, if the tool cannot be merged with this shape, then a merge with the parent shape will be attempted. Defaults to true. | |
Store | Gets the Store that contains the element. (Inherited from ModelElement.) | |
StyleSet | Gets an instance of the style set for the shape. | |
Subject | Gets or sets the subject for the presentation element. Defaults to the same object as ModelElement. (Inherited from PresentationElement.) | |
TargetToolboxItemFilterAttributes | Gets a collection of attributes that determine which items are enabled or disabled in the Toolbox. | |
ZOrder | Determines the order in which this shape will be displayed relative to other shapes on the diagram. Normally set from the order of child shapes. |
Top
Methods
Name | Description | |
---|---|---|
AccessibleDoDefaultAction | Performs the default action for the accessible object. | |
Associate | Assigns a model element to the presentation element. The same effect as setting ModelElement. (Inherited from PresentationElement.) | |
AssociateValueWith(Store, AssociatedPropertyInfo) | Associates the resource for the shape with an in-memory store property that is assigned to the shape. | |
AssociateValueWith(Store, Guid) | Associates the resource for the shape with an in-memory store property that is assigned to the shape. | |
CalculateDerivedVisible | Verifies whether the child shape appears. | |
CanMerge | Verifies whether a source element can be added to this element. (Inherited from ModelElement.) | |
ChooseMergeTarget(ElementGroup) | Selects a target element to accept as its child an element that the user wants to copy, drag, or create. (Inherited from ModelElement.) | |
ChooseMergeTarget(ElementGroupPrototype) | Selects a target element to accept as its child an element that the user wants to copy, drag, or create. (Inherited from ModelElement.) | |
ChooseParentShape | Selects a parent shape for a new child shape, typically this shape. | |
ChooseRelationship | Selects which child list a new child shape should be added to – NestedChildShapes or RelativeChildShapes. | |
CoerceSelection | Allows a shape to determine which other shapes are selected. | |
Copy() | Creates a copy of the element in the model. (Inherited from ModelElement.) | |
Copy(IEnumerable<Guid>) | Creates a copy of the element and its child links and elements. (Inherited from ModelElement.) | |
CreateChildShape | Creates a shape and adds it as a child to this shape. | |
CreateClassStyleSet | Creates a class style set for the shape type. | |
CreateDecorators | Creates a collection of decorators for the shape type. | |
CreateInstanceStyleSet | Creates a style set for the shape. | |
CreateShapeFields | Creates a collection of shape fields for the shape type. | |
Delete() | Deletes an element from the model. (Inherited from ModelElement.) | |
Delete(array<Guid[]) | Deletes an element from the model. (Inherited from ModelElement.) | |
DetermineHighlightShape | Finds the highlighted shape in a chain of shapes. | |
DoFoldToShape | Calculates the point where a connector will touch the perimeter of a shape. Override this if you define a non-rectangular shape. | |
DoHitTest(PointD, DiagramHitTestInfo) | Returns true if the specified point is within the shape. | |
DoHitTest(PointD, DiagramHitTestInfo, Boolean) | Returns true if the specified point is within the shape. | |
DoHitTestSelection | Returns true if a given point is in the selection handles around the shape. | |
DoKeyboardNavigation | Navigates the from shape to shape, using the keyboard. | |
DrawResizeFeedback | Draws the resizing feedback for the shape. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
ExcludeFromClipRegion | Excludes the shape and its child shapes from the clipping region. | |
ExcludeGeometryFromClipRegion | Excludes the geometry of a shape and its child shapes from the clipping region. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindDecorator(String) | Finds the shape decorator that has a given name. | |
FindDecorator(IList<Decorator>, String) | Finds the shape decorator that has a given name. | |
FindFirstChild | Searches for the first child in the navigation sequence for the shape. | |
FindFreeArea | Finds an empty area on the grid for the shape. | |
FindLastChild | Searches for the last child in the navigation sequence for the shape. | |
FindNextChild | Searches for the next child in the navigation sequence for the shape. | |
FindNextInChildFields | Searches for the next shape field in the navigation sequence. | |
FindPreviousChild | Searches for the previous child in the navigation sequence for the shape. | |
FindPreviousInChildFields | Searches for the previous shape field in the navigation sequence. | |
FindShapeField(String) | Searches for a shape field in a shape. | |
FindShapeField(IList<ShapeField>, String) | Searches for a shape field in a shape. | |
FixUpChildShapes | Creates or adjusts the child shapes that should be created when a model element is created or updated. Called by Diagram.FixUpDiagram(). | |
Focused | Verifies whether the shape has the focus. | |
GetAccessibilityObject | Gets the accessible object that is assigned to the shape. | |
GetChildElements | Gets a collection of child shapes that belong to the parent shape. | |
GetCursor | Gets the pointer that appears when the mouse is over the shape. | |
GetDomainClass | Gets the most-derived domain class for this element. (Inherited from ModelElement.) | |
GetDragOverToolTipText | Gets the tooltip text that appears when the mouse is over the shape. | |
GetFieldAccessibleDescription | Gets the description for a field in the shape. | |
GetFieldAccessibleName | Gets the name of a field in the shape. | |
GetFieldAccessibleValue | Gets the value for a field in the shape. | |
GetFieldRepresentedElement | Gets the primary element that the child shape represents. | |
GetFieldRepresentedProperty | Gets the property information for a field in the shape. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetPotentialMouseAction | Gets the mouse action to perform for a mouse down event over a specific point in the diagram. | |
GetRoleCollection<TCollection, TElement>(Guid) | Gets or creates the linked element collection (Inherited from ModelElement.) | |
GetShapeLuminosity | Calculates the luminosity of the shape. | |
GetSubFieldAccessibleDescription | Gets the description for a child field in the shape. | |
GetSubFieldAccessibleName | Gets the name of a child field in the shape. | |
GetSubFieldAccessibleValue | Gets the value for a child field in the shape. | |
GetSubFieldRepresentedElements | Gets a collection of elements that the shape for the child field represents. | |
GetSubFieldRepresentedProperty | Gets the property for the child field. | |
GetSubFieldRepresentedPropertyElements | Gets the element that contains the property for the child field. | |
GetToolTipText | Gets the tooltip text for the shape to which the mouse is pointing. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasCachedDragOverResult | Verifies whether the results are cached for the drag-over mouse event. | |
Hide | Hides the shape and all its children. | |
HideCustomToolTip | Hides the custom tooltip for the shape. | |
InitializeDecorators | Initializes and adds fields to the shape type. | |
InitializeInstanceResources | Initializes the resources for an instance of the shape. | |
InitializeResources | Initializes the resources for the shape. | |
InitializeShapeFields | Initializes the list of fields that represent parts of the shape such as labels, icons, rows of text, and background images. Called once per class. | |
Invalidate() | Makes sure that the shape and its immediate surroundings will be repainted at the end of the transaction. | |
Invalidate(Boolean) | Makes sure that the shape will be repainted at the end of the transaction. Call this if you have changed properties of the shape. | |
Invalidate(RectangleD) | Makes sure that the shape and its old location will be repainted at the end of the transaction. | |
IsDescendantOf | Verifies whether the shape is a descendent of another shape. | |
IsNavigationKey(Char) | Verifies whether the key is used as a navigational command. | |
IsNavigationKey(Keys) | Verifies whether the key data is used as a navigational command. | |
IterateShapes | Iterates through a shape and its child shapes. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MergeConfigure | Not used for presentation elements. (Inherited from PresentationElement.) | |
MergeDisconnect | Disconnects a source element from a target element. (Inherited from ModelElement.) | |
MergeRelate | Creates a relationship between a model element and a group of model elements. (Inherited from PresentationElement.) | |
ModifyLuminosity | Calculates the luminosity of the highlight for the shape. | |
MoveByRepositioning(DiagramDragEventArgs) | Repositions the shapes in the group by the amount that the position of the mouse determines. | |
MoveByRepositioning(ElementGroupPrototype, DiagramItemCollection, PointD, DiagramItem) | Repositions the shapes in the group by the amount that the position of the mouse determines. | |
NavigateAscend | Navigates to the next ancestor in the navigation sequence and updates the focus. Called in response to user navigation keystrokes. | |
NavigateDescend | Navigates to the next descendent in the navigation sequence and updates the focus. Called in response to user navigation keystrokes. | |
NavigateTo | Navigates to a specific shape in the navigation sequence and updates the focus. | |
NavigateToFirst | Navigates to the first shape in the navigation sequence in the parent of the current selection. Called in response to user navigation keystrokes. | |
NavigateToLast | Navigates to the last shape in the navigation sequence in the parent of the current selection. Called in response to user navigation keystrokes. | |
NavigateToNext | Navigates to the next shape in the navigation sequence. Called in response to user navigation keystrokes. | |
NavigateToPrevious | Navigates to the previously selected shape in the navigation sequence. Called in response to user navigation keystrokes. | |
OnAssociatedPropertyChanged | Updates the shape when the value of an in-memory store property changes for a field in the shape. | |
OnBeforePaint | Updates resources, such as pens and brushes, before they are used to paint the shape. | |
OnBeginEdit | Called when the user starts to edit a text field. | |
OnBoundsFixup | Called when the bounds position and size of the parent and children are set or adjusted. Override to modify the size or internal layout. | |
OnChildConfigured | Called when the positions and sizes of child shapes are about to be determined. Override to set specialized rules. | |
OnChildConfiguring | Called after the size and position of a child shape has been determined. | |
OnClick | Called when the user clicks the shape. | |
OnCopy | Called when this element has been created as a copy of another element. (Inherited from ModelElement.) | |
OnDeleted | Called when this element has been deleted from the model. (Inherited from ModelElement.) | |
OnDeleting | Called when this element is about to be deleted. (Inherited from ModelElement.) | |
OnDoubleClick | Called when the user double-clicks the shape. | |
OnDragDrop | Called when the user drags an item onto the shape. | |
OnDragEnter | Called when the mouse enters a shape during a drag operation. | |
OnDragLeave | Called when the mouse moves out of a shape. | |
OnDragOver | Override this method to respond to the movement of the mouse over the shape. Set e.Effect to indicate the cursor feedback to the user. | |
OnEndEdit | Called when the user ends editing a text field. | |
OnInitialize | Called to initialize the shape. Override this to attach event handlers and rules to this object. | |
OnKeyDown | Called when a key is pressed. | |
OnKeyPress | Called when a character is typed. | |
OnKeyUp | Called when a key is released. | |
OnMouseDown | Called when the user presses a mouse key. | |
OnMouseEnter | Called when the mouse enters a shape. | |
OnMouseHover | Called when the mouse hovers over a shape. | |
OnMouseLeave | Called when the mouse leaves a shape. | |
OnMouseMove | Called repeatedly when the user moves the mouse. | |
OnMouseUp | Called when a mouse button is released. | |
OnMouseWheel | Called when the user has rotated the mouse wheel. | |
OnOrphaned | Called when a | |
OnPaintEmphasis | Called when emphasis has been applied to the selected shape. | |
OnPaintFeedback | Called when drag-and-drop feedback is painted. | |
OnPaintSelection | Called to paint the selection highlight. | |
OnPaintShape | Called to paint the basic parts of the shape. | |
OnResurrected | Called when this element has been added back to a model. (Inherited from ModelElement.) | |
OnRolePlayerPositionChanged | Called when the position of a role has changed. (Inherited from ModelElement.) | |
OnRolePlayerPositionChanging | Called when a role player position is about to change. (Inherited from ModelElement.) | |
OnShapeInserted | Called when a shape has been inserted as a child of another. | |
OnShapeRemoved | Called when the shape has been removed as a child shape from its parent shape. | |
PerformResizeParentRule() | Alerts the Domain-Specific Language Designer that a parent shape must be resized to match its child shapes. | |
PerformResizeParentRule(Boolean, ShapeElement) | Alerts the Domain-Specific Language Designer that a parent shape must be resized to match its child shapes. | |
PermitChildVisibility | Verifies whether the child shape should appear in the diagram. | |
ProcessVisibilityChange | Updates the visibility of the child shape when a change to visibility is made. | |
PurgeLayoutObjects | Removes the objects that are used to position the shape on the diagram grid. | |
PurgePoints | Removes points for the shape on the diagram grid. | |
RebuildShape | Rebuilds the shape. | |
RemoveLayoutObject | Removes the shape, including any relative and nested child shapes, from the diagram grid. | |
Selected | Verifies whether the shape is selected in a specified view. | |
SetInitialGraphLayoutVisibility | Sets the visibility of the graph. | |
SetShowHideState | Sets the visibility of the shape and all its children. | |
SetShowHideStateImplementation | Sets the visibility of the shape. | |
ShouldAddShapeForElement | Determines whether a shape should be created to represent a given domain class instance on the diagram. | |
ShouldReparentOnMove | Verifies whether a child shape should be added to a new parent when the child shape is moved. | |
Show | Makes a shape and all its children visible. | |
ShowCustomToolTip | Makes a shape's custom tooltip visible. | |
ToString | Gets the name of the shape and its type. (Overrides Object.ToString().) | |
TranslateGeometryToAbsoluteBounds | Converts the relative bounds to absolute bounds for the shape's geometry. | |
TranslateGeometryToRelativeBounds | Converts the absolute bounds to relative bounds for the shape's geometry. | |
TranslateToAbsoluteBounds | Converts the relative bounds to absolute bounds for the shape. | |
TranslateToRelativeBounds | Converts the absolute bounds to relative bounds for the shape. | |
UpdateDerivedVisible | Updates the visible state of the derived shape. | |
UpdateGeometryLuminosity(DiagramClientView, Brush) | Updates the luminosity for the brush. | |
UpdateGeometryLuminosity(DiagramClientView, Pen) | Updates the luminosity for the pen. |
Top
Events
Name | Description | |
---|---|---|
Click | Occurs when the user clicks the mouse over a shape. | |
DoubleClick | Occurs when the user double-clicks the mouse. | |
KeyDown | Occurs when the user presses a key. | |
KeyPress | Occurs when the user presses and releases a key. | |
KeyUp | Occurs when the user releases a key. | |
MouseDown | Occurs when the user presses the mouse button. | |
MouseMove | Occurs when the user moves the mouse. | |
MouseUp | Occurs when the user releases the mouse button. | |
MouseWheel | Occurs when the user rotates the mouse wheel. |
Top
Extension Methods
Name | Description | |
---|---|---|
AddExtension(Guid) | Overloaded. Extend this ModelElement with newly instantiated extension of the identified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.) | |
AddExtension(Type) | Overloaded. Extend this ModelElement with a newly instantiated extension of the specified type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.) | |
AddExtension(DomainClassInfo) | Overloaded. Extend this ModelElement with a newly instantiated extension of the specified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.) | |
AddExtension(ExtensionElement) | Overloaded. Extend this ModelElement with a specific extension. An InvalidOperationException will be thrown if the element already has an extension of the same type. (Defined by ModelElementExtensionMethods.) | |
AddExtension<T>() | Overloaded. Extend this ModelElement with a newly instantiated extension of a particular type. An InvalidOperationException will be thrown if the element already has an extension of the same type. (Defined by ModelElementExtensionMethods.) | |
CanDelete | Deletes the element from the model. (Defined by ImmutabilityExtensionMethods.) | |
GetAllExtensions | Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement. (Defined by ModelElementExtensionMethods.) | |
GetBaseElement | Returns the root of the virtual MEL in which the specified ModelElement is participating. (Defined by ModelElementExtensionMethods.) | |
GetExtension(Guid) | Overloaded. (Defined by ModelElementExtensionMethods.) | |
GetExtension(Type) | Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised. (Defined by ModelElementExtensionMethods.) | |
GetExtension(DomainClassInfo) | Overloaded. (Defined by ModelElementExtensionMethods.) | |
GetExtension<T>() | Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised. (Defined by ModelElementExtensionMethods.) | |
GetLocks | Get the lock flags for this element. This will include any locks enabled on the Partition containing the element. (Defined by ImmutabilityExtensionMethods.) | |
IsExtendedBy(Guid) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) | |
IsExtendedBy(Type) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) | |
IsExtendedBy(DomainClassInfo) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) | |
IsLocked | Test whether this element has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.) | |
RemoveExtension(Type) | Overloaded. Remove any extension of this ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) | |
RemoveExtension(Guid) | Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) | |
RemoveExtension(DomainClassInfo) | Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) | |
RemoveExtension(ExtensionElement) | Overloaded. Remove a specified ExtensionElement from the extensions of this ModelElement. (Defined by ModelElementExtensionMethods.) | |
SetLocks | Set the lock flags of this element (Defined by ImmutabilityExtensionMethods.) | |
TryGetExtension(Guid) | Overloaded. (Defined by ModelElementExtensionMethods.) | |
TryGetExtension(Type) | Overloaded. (Defined by ModelElementExtensionMethods.) | |
TryGetExtension(DomainClassInfo) | Overloaded. (Defined by ModelElementExtensionMethods.) | |
TryGetExtension<T>() | Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If this element has no such extension then the result will be null. (Defined by ModelElementExtensionMethods.) |
Top
Fields
Name | Description | |
---|---|---|
DomainClassId | Represents the ID that is assigned to the shape. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IMergeElements.CanMerge | Returns true if this element can merge with the content of the prototype. (Inherited from ModelElement.) | |
IMergeElements.ChooseMergeTarget(ElementGroup) | (Inherited from ModelElement.) | |
IMergeElements.ChooseMergeTarget(ElementGroupPrototype) | (Inherited from ModelElement.) | |
IMergeElements.MergeConfigure | (Inherited from ModelElement.) | |
IMergeElements.MergeDisconnect | (Inherited from ModelElement.) | |
IMergeElements.MergeRelate | (Inherited from ModelElement.) |
Top
Remarks
To navigate to the model element or relationship that the shape represents, use ModelElement().
Important subtypes include:
Diagram – represents a collection of shapes and connectors. The content of a Diagram is persisted in a .diagram file. If you specify a diagram class in your DSL Definition, it is derived from this class.
NodeShape – represents a shape that has a non-zero area, not a connector. If you specify shape classes in your DSL Definition, they are derived from NodeShape.
BinaryLinkShape – represents a line between two NodeShapes. If you specify connector classes in your DSL Definition, they are derived from this BinaryLinkShape.
For more information, see [redirect] How to: Navigate and Update a Diagram.
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
Other Resources
[redirect] How to: Navigate and Update a Diagram
Change History
Date |
History |
Reason |
---|---|---|
June 2010 |
Extended and clarified descriptions. |
Customer feedback. |