共用方式為


ConnectorDecorator Class

Definition

Class to encapsulate the way ShapeFields and child Shapes are used to represent Notation Decorators when they are placed on a Connector

public ref class ConnectorDecorator : Microsoft::VisualStudio::Modeling::Diagrams::Decorator
public class ConnectorDecorator : Microsoft.VisualStudio.Modeling.Diagrams.Decorator
type ConnectorDecorator = class
    inherit Decorator
Public Class ConnectorDecorator
Inherits Decorator
Inheritance
ConnectorDecorator

Remarks

All Decorators on connectors require host shapes

Constructors

ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, Boolean)

Creates a ConnectorDecorator.

ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, PointD, Boolean)

Creates a ConnectorDecorator.

ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, PointD)

Creates a ConnectorDecorator.

ConnectorDecorator(ShapeField, ConnectorDecoratorPosition)

Creates a ConnectorDecorator.

Properties

CanMove

Whether this decorator can be moved. A decorator can be moved only if it is instantiated as moveable and also requires a host.

(Inherited from Decorator)
DecoratorAnchorMargins

Helper to get the size of the Margins specified in the ShapeField's anchoring.

(Inherited from Decorator)
Field

The ShapeField item that this decorator specifies.

(Inherited from Decorator)
Offset

Gets or sets the offset used to modify the default position of the decorator specified by position. How it works:

For non-centered shape positions the X and/or Y offset coordinate is simply added to the X and/or Y position of the decorator.

For centered shape positions, the X and/or Y offset coordinate is treated as a percentage in the range 0 to 1.0, and is added to 0.5 to modify the position of the decorator.

For connector decorators, the X and/or Y offset coordinates modify the distance between the decorator and the line and/or shape the line connects to. The greater the offset, the greater the distance.

For example, if a shape decorator position of OuterMiddleLeft is specified, and the offset is (-0.1, 0.1), then the decorator will be shifted 0.1 units to the left and placed 60% of the way between the top and bottom of the shape.

(Inherited from Decorator)
Position

Gets the position of this decorator relative to the parent shape.

RequiresHost

All connector decorators require a host.

Methods

AssociateValueWith(Store, AssociatedPropertyInfo)

Associates this decorator with a domain property.

(Inherited from Decorator)
AssociateValueWith(Store, Guid, AssociatedPropertyInfo) (Inherited from Decorator)
AssociateValueWith(Store, Guid)

Associates this decorator with an IMS property on the ShapeElement hosting the decorator.

(Inherited from Decorator)
AssociateVisibilityWith(Store, AssociatedPropertyInfo)

Associates this decorator's visibility with domain property.

(Inherited from Decorator)
AssociateVisibilityWith(Store, Guid, AssociatedPropertyInfo)

Associates this decorator's visibility with a domain property, when the shape is mapped to an instance of the given domain class. Use this method when there are multiple domain classes that this decorator can be mapped to.

(Inherited from Decorator)
AssociateVisibilityWith(Store, Guid)

Associates this decorator's visibility with an IMS property on the ShapeElement hosting the decorator.

(Inherited from Decorator)
ConfigureHostShape(ShapeElement)

Configures a host shape for use with this decorator.
If the given parent does not have a host shape for this decorator, a new one will be created. If a host shape already exists, settings for this decorator will be re-applied to the existing host shape; a new host shape will not be created.

GetHostShape(ShapeElement) (Inherited from Decorator)
GetValue(ShapeElement)

Gets the value associated with this decorator and the given parent shape.

(Inherited from Decorator)
GetVisible(ShapeElement)

Gets the visibility of this decorator in the context of the given parent shape.

(Inherited from Decorator)
OnAfterOffsetChanged()

Hook for derived classes to make modifications to the decorator after the offset changes.

(Inherited from Decorator)
RepositionHostShape(DecoratorHostShape)

Repositions the given host shape based on the position of the connector.

SetValue(ShapeElement, Object)

Sets the value associated with this decorator and the given parent shape.

(Inherited from Decorator)
SetVisible(ShapeElement, Object)

Sets the visibility of this decorator in the context of the given parent shape.

(Inherited from Decorator)
UpdateDecoratorHostShapes(ModelElement, Guid)

Given a model element, finds all mapped presentation elements, and updates the corresponding decorator host shape bounds.

(Inherited from Decorator)
UpdateDecoratorHostShapes(ModelElement)

Given a model element, finds all mapped presentation elements, and updates the corresponding decorator host shape bounds.

(Inherited from Decorator)
UpdateHostShapeVisibility(DecoratorHostShape) (Inherited from Decorator)

Applies to