Decorator.Offset Property
Gets or sets the offset that modifies the default position of the decorator.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.dll)
Syntax
'Declaration
Public Property Offset As PointD
'Usage
Dim instance As Decorator
Dim value As PointD
value = instance.Offset
instance.Offset = value
public PointD Offset { get; set; }
public:
property PointD Offset {
PointD get ();
void set (PointD value);
}
public function get Offset () : PointD
public function set Offset (value : PointD)
Property Value
Type: Microsoft.VisualStudio.Modeling.Diagrams.PointD
Remarks
For shapes that are not centered over a point, the x-offset and y-offset are added to the x-position and y-position of the decorator that is assigned to the shape.
For shapes that are centered over a point, the x-offset and y-offset are converted to percentages (0.0 to 1.0), and .5 is added to modify the position of the decorator.
For link decorators, the x-offset and y-offset modify the distance between the decorator, the link, and the shape to which the link is connected. The larger the offset, the longer the distance.
The diagram does not automatically update if you change the decorator offset. If the decorator exists inside the shape, you must call Invalidate to update the shape. If the decorator exists outside the shape, you must call ConfigureHostShape and RepositionHostShape to update the shape.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.