Xamarin.Forms Guides | Samples

Xamarin.Forms.Point Structure

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

See Also: Point

Syntax

[System.Diagnostics.DebuggerDisplay("X={X}, Y={Y}")]
[Xamarin.Forms.TypeConverter(typeof(Xamarin.Forms.PointTypeConverter))]
public struct Point

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

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

static
ZeroPoint. The Point at {0,0}.

Public Properties

[read-only]
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.
override
Equals(Object) : Boolean
Returns true if the X and Y values of this are exactly equal to those in the argument.
override
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.
override
ToString() : String
A human-readable representation of the Point.

Public Operators

static
Addition(Point, Size)Returns a new Point by adding a Size to a Point.
static
Equality(Point, Point)Whether the two Points are equal.
static
Inequality(Point, Point)Whether two points are not equal.
static
Subtraction(Point, Size)Returns a new Point by subtracting a Size from a Point.
static
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.