VerticalPosition Struct
Represents a vertical positioning which can be expressed with VerticalPositionType enumeration or System.Double value.
public struct VerticalPosition : IEquatable<VerticalPosition>
Public Structure VerticalPosition
Implements IEquatable(Of VerticalPosition)
Implements
Constructors
VerticalPosition(VerticalPositionType, VerticalPositionAnchor)
Initializes a new instance of the VerticalPosition struct with specified alignment.
public VerticalPosition(VerticalPositionType alignment, VerticalPositionAnchor relativeTo)
Public Sub New(alignment As VerticalPositionType, relativeTo As VerticalPositionAnchor)
Parameters
alignment
- VerticalPositionType
The alignment relative to VerticalPositionAnchor specified by relativeTo
parameter.
relativeTo
- VerticalPositionAnchor
The location from which alignment
parameter is relative to.
VerticalPosition(Double, LengthUnit, VerticalPositionAnchor)
Initializes a new instance of the VerticalPosition struct with specified absolute position.
public VerticalPosition(double absolutePosition, LengthUnit unit, VerticalPositionAnchor below)
Public Sub New(absolutePosition As Double, unit As LengthUnit, below As VerticalPositionAnchor)
Parameters
absolutePosition
- System.Double
The absolute position in units specified by unit
parameter in direction below of the location specified by below
parameter.
unit
- LengthUnit
The measurement unit for absolute position value.
The location from which absolute position is offset from. If absolutePosition
parameter is positive, offset is below of VerticalPositionAnchor specified by below
parameter, otherwise offset is above.
Properties
PositionType
Gets the vertical position type which can either be absolute or relative.
public readonly VerticalPositionType PositionType { get; }
Public ReadOnly Property PositionType As VerticalPositionType
Property Value
The vertical position type which can either be absolute or relative.
RelativeTo
Gets the base location of this vertical position.
public readonly VerticalPositionAnchor RelativeTo { get; }
Public ReadOnly Property RelativeTo As VerticalPositionAnchor
Property Value
The base location of this vertical position.
Value
Gets the vertical position absolute value in points if PositionType is Absolute, otherwise value is not applicable.
Property Value
- System.Double
The vertical position absolute value in points if PositionType is Absolute, otherwise value is not applicable.
Methods
Equals(VerticalPosition)
Determines whether the other
VerticalPosition is equal to this VerticalPosition instance.
public bool Equals(VerticalPosition other)
Public Function Equals(other As VerticalPosition) As Boolean
Parameters
other
- VerticalPosition
The other vertical position to compare with this vertical position instance.
Returns
- System.Boolean
true if the other
VerticalPosition is equal to this VerticalPosition instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this VerticalPosition instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this vertical position instance.
Returns
- System.Boolean
true if the specified System.Object is a VerticalPosition and is equal to this VerticalPosition instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this VerticalPosition instance.
Returns
- System.Int32
An integer value that specifies a hash value for this VerticalPosition instance.
Overrides
ToString()
Returns a System.String that represents this VerticalPosition instance.
Returns
- System.String
A System.String that represents this VerticalPosition instance.
Overrides
Operators
Equality(VerticalPosition, VerticalPosition)
Determines whether first
and second
VerticalPositions are equal.
public static bool operator ==(VerticalPosition first, VerticalPosition second)
Public Shared Operator =(first As VerticalPosition, second As VerticalPosition) As Boolean
Parameters
first
- VerticalPosition
The first vertical position.
second
- VerticalPosition
The second vertical position.
Returns
- System.Boolean
true if first
and second
vertical positions are equal; otherwise, false.
Inequality(VerticalPosition, VerticalPosition)
Determines whether first
and second
VerticalPositions are not equal.
public static bool operator !=(VerticalPosition first, VerticalPosition second)
Public Shared Operator <>(first As VerticalPosition, second As VerticalPosition) As Boolean
Parameters
first
- VerticalPosition
The first vertical position.
second
- VerticalPosition
The second vertical position.
Returns
- System.Boolean
true if first
and second
vertical positions are not equal; otherwise, false.