Represents an x- and y-coordinate pair in two-dimensional space.
Assembly: WindowsBase (in WindowsBase.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Thetype exposes the following members.
|Add||Adds a Vector to a and returns the result as a structure.|
|Equals(Object)||Determines whether the specified Object is a and whether it contains the same coordinates as this . (Overrides ValueType.Equals(Object).)|
|Equals(Point)||Compares two structures for equality.|
|Equals(Point, Point)||Compares two structures for equality.|
|GetHashCode||Returns the hash code for this . (Overrides ValueType.GetHashCode.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Multiply||Transforms the specified structure by the specified Matrix structure.|
|Offset||Offsets a point's X and Y coordinates by the specified amounts.|
|Parse||Constructs a from the specified String.|
|Subtract(Point, Point)||Subtracts the specified from another specified and returns the difference as a Vector.|
|Subtract(Point, Vector)||Subtracts the specified Vector from the specified and returns the resulting .|
|ToString||Creates a String representation of this . (Overrides ValueType.ToString.)|
|ToString(IFormatProvider)||Creates a String representation of this .|
|Addition||Translates the specified by the specified Vector and returns the result.|
|Equality||Compares two structures for equality.|
|Narrowing(Point to Vector)||Creates a Vector structure with an X value equal to the point's X value and a Y value equal to the point's Y value.|
|Narrowing(Point to Size)||Creates a Size structure with a Width equal to this point's X value and a Height equal to this point's Y value.|
|Inequality||Compares two structures for inequality.|
|Multiply||Transforms the specified by the specified Matrix.|
|Subtraction(Point, Point)||Subtracts the specified from another specified and returns the difference as a Vector.|
|Subtraction(Point, Vector)||Subtracts the specified Vector from the specified and returns the resulting .|
Some cultures might use the comma character as the decimal delimiter instead of the period character. XAML processing for invariant culture defaults to en-US in most XAML processor implementations, and expects the period to be the decimal delimiter. You should avoid using the comma character as the decimal delimiter if specifying a in XAML, because that will clash with the string type conversion of a attribute value into the X and Y components.
The following example shows how to check if two structures are not equal. It also illustrates how to assign values to a structure when the structure is being declared and after the structure has been declared.
' Checks if two Points are equal using the overloaded inequality operator. Private Function pointInequalityExample() As Boolean ' Checks if two Points are not equal using the overloaded inequality operator. ' Declaring point1 and initializing x,y values Dim point1 As New Point(10, 5) ' Declaring point2 without initializing x,y values Dim point2 As New Point() ' Boolean to hold the result of the comparison Dim areNotEqual As Boolean ' assigning values to point2 point2.X = 15 point2.Y = 40 ' Compare Point structures for equality. ' areNotEqual is True areNotEqual = (point1 <> point2) Return areNotEqual End Function
|How to: Make an Object Follow the Mouse Pointer||This example shows how to change the dimensions of an object when the mouse pointer moves on the screen.|
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.