Skip to main content

RelativePoint Structure

Defines a point that may be defined relative to a containing element.

Definition

Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public readonly struct RelativePoint : IEquatable<RelativePoint>
View Source
InheritanceObjectValueType → RelativePoint
ImplementsIEquatable(RelativePoint)

Constructors

RelativePoint(Point, RelativeUnit)Initializes a new instance of the RelativePoint struct.
RelativePoint(Double, Double, RelativeUnit)Initializes a new instance of the RelativePoint struct.

Properties

PointGets the point.
UnitGets the unit.

Methods

Equals(Object)Checks if the RelativePoint equals another object.
(Overrides ValueType.Equals(Object))
Equals(RelativePoint)Checks if the RelativePoint equals another point.
GetHashCode()Gets a hashcode for a RelativePoint.
(Overrides ValueType.GetHashCode())
GetType()Gets the Type of the current instance.
(Inherited from Object)
Parse(String)Parses a RelativePoint string.
ToPixels(Rect)Converts a RelativePoint into pixels.
ToPixels(Size)Converts a RelativePoint into pixels.
ToString()Returns a String representing this RelativePoint instance.
(Overrides ValueType.ToString())

Operators

Equality(RelativePoint, RelativePoint)Checks for equality between two RelativePoints.
Inequality(RelativePoint, RelativePoint)Checks for inequality between two RelativePoints.

Fields

BottomRightA point at the bottom right of the containing element.
CenterA point at the center of the containing element.
TopLeftA point at the top left of the containing element.

See Also

Reference

Avalonia Namespace