다음을 통해 공유


Decorator.Offset Property

Definition

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.

public:
 property Microsoft::VisualStudio::Modeling::Diagrams::PointD Offset { Microsoft::VisualStudio::Modeling::Diagrams::PointD get(); void set(Microsoft::VisualStudio::Modeling::Diagrams::PointD value); };
public Microsoft.VisualStudio.Modeling.Diagrams.PointD Offset { get; set; }
member this.Offset : Microsoft.VisualStudio.Modeling.Diagrams.PointD with get, set
Public Property Offset As PointD

Property Value

Remarks

Changing the decorator offset does not automatically cause the diagram to update. If the decorator exists inside the shape, all shapes using the decorator must be invalidated after the change. If the decorator exists outside the shape, ConfigureHostShape and RepositionHostShape must be called for all host shapes hosting this decorator.

Applies to