New to Telerik Document ProcessingStart a free 30-day trial

Defines horizontal positioning for a floating shape using either offset or alignment relative to a reference point.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Shapes

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public class HorizontalPosition

Inheritance: objectHorizontalPosition

Constructors

Creates a new horizontal position with default settings (column-relative, zero offset).

C#
public HorizontalPosition()

Creates a new horizontal position using a numeric offset from the specified reference point.

C#
public HorizontalPosition(HorizontalRelativeFrom relativeFrom, double offset)
Parameters:relativeFromHorizontalRelativeFrom

The relative from.

offsetdouble

The offset.

Creates a new horizontal position using alignment (left, center, right, etc.) relative to the specified reference point.

C#
public HorizontalPosition(HorizontalRelativeFrom relativeFrom, RelativeHorizontalAlignment alignment)
Parameters:relativeFromHorizontalRelativeFrom

The relative from.

alignmentRelativeHorizontalAlignment

The alignment.

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Properties

Gets or sets the alignment value used when the position type is alignment.

C#
public RelativeHorizontalAlignment Alignment { get; set; }
Property Value:

The alignment.

Gets or sets the numeric offset in device-independent pixels used when the position type is offset.

C#
public double Offset { get; set; }
Property Value:

The offset.

Gets or sets the reference point (page, margin, column, or character) from which the position is calculated.

C#
public HorizontalRelativeFrom RelativeFrom { get; set; }
Property Value:

The horizontal relative from value.

Gets or sets whether the position uses offset or alignment mode.

C#
public PositionValueType ValueType { get; set; }
Property Value:

The type of the positioning.