Xamarin.Forms Guides | Samples

Xamarin.Forms.Point Structure

Struct defining a 2-D point as a pair of doubles.

See Also: Point


[System.Diagnostics.DebuggerDisplay("X={X}, Y={Y}")]
public struct Point


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.Point are listed below.

See Also: ValueType

Public Constructors

Creates a new Point object that has coordinates that are specified by the width and height of sz, in that order.
Creates a new Point object that represents the point (x,y).

Public Fields

ZeroPoint. The Point at {0,0}.

Public Properties

IsEmptyBoolean. Whether both X and Y are 0.
XDouble. Location along the horizontal axis.
YDouble. Location along the vertical axis.

Public Methods

Distance(Point) : Double
Calculates the distance between two points.
Equals(Object) : Boolean
Returns true if the X and Y values of this are exactly equal to those in the argument.
GetHashCode() : Int32
Returns a hash value for the Point.
Offset(Double, Double) : Point
Returns a new Point that translates the current Point by dx and dy.
Round() : Point
Returns a new Point whose Point.X and Point.Y have been rounded to the nearest integral value.
ToString() : String
A human-readable representation of the Point.

Public Operators

Addition(Point, Size)Returns a new Point by adding a Size to a Point.
Equality(Point, Point)Whether the two Points are equal.
Inequality(Point, Point)Whether two points are not equal.
Subtraction(Point, Size)Returns a new Point by subtracting a Size from a Point.
Conversion to Xamarin.Forms.Size(Explicit)Returns a new Size whose Size.Width and Size.Height and equivalent to the pt's Point.X and Point.Y properties.