VDocs.NET
HomeAPI Reference
Back to DOM

DOM.Elements.Graphics.Position

Namespace: DOM.Elements.Graphics

Represents the positioning configuration of a floating document element (such as an image or shape) relative to the page, margins, or text.

This class extendsand provides a high-level, schema-safe abstraction over WordprocessingML and DrawingML anchor positioning. The implementation guarantees that mutually exclusive positioning modes (absolute offset vs. alignment) are always enforced at runtime, preventing the generation of invalid or unsafe XML.

13 members

Constructors

Position

4 overloads
Position()

Initializes a newinstance using default, Word-compatible positioning values.

Position(double x, double y, Units unit)

Initializes a newinstance using absolute horizontal and vertical offsets.

Parameters

x
Horizontal offset.
y
Vertical offset.
unit
Measurement unit for the offsets.
Position(HorizontalAlignmentValues horizontalAlignment, VerticalAlignmentValues verticalAlignment)

Initializes a newinstance using alignment-based positioning relative to the page.

Parameters

horizontalAlignment
Horizontal alignment.
verticalAlignment
Vertical alignment.
Position(HorizontalAlignmentValues horizontalAlignment, double y, Units unit)

Initializes a newinstance using mixed positioning, with horizontal alignment and vertical absolute offset.

Parameters

horizontalAlignment
Horizontal alignment.
y
Vertical offset.
unit
Measurement unit for the vertical offset.

Properties

AllowOverlap

Gets or sets a value indicating whether the element is allowed to overlap other floating elements.

HorizontalAlignment

Gets or sets the horizontal alignment of the element within its.

Setting this property switches the horizontal positioning mode to alignment-based positioning and clears any absolute offset.

HorizontalIsAbsoluteBasePosition

Gets or sets a value indicating whether the horizontal position is specified as an absolute offset.

When set to, horizontal alignment is cleared and the horizontal offset defined inis used.

HorizontalRelativePosition

Gets or sets the reference frame used for horizontal positioning (for example, page, margin, or column).

LockAnchor

Gets or sets a value indicating whether the anchor point of the element is locked to prevent repositioning.

MoveObjectWithText

Gets or sets a value indicating whether the element moves together with the associated text when the document content changes.

VerticalAlignment

Gets or sets the vertical alignment of the element within its.

Setting this property switches the vertical positioning mode to alignment-based positioning and clears any absolute offset.

VerticalIsAbsoluteBasePosition

Gets or sets a value indicating whether the vertical position is specified as an absolute offset.

When set to, vertical alignment is cleared and the vertical offset defined inis used.

VerticalRelativePosition

Gets or sets the reference frame used for vertical positioning (for example, page, margin, paragraph, or line).