May 11, 2014
Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
Either a space or a comma can be used as the delimiter. See "Point Values in XAML" heading in Remarks below.
Some XAML usages use the type to represent a logical point, rather than a point in a logical pixel coordinate space. In this case, the values of X and Y are expected to be floating-point values between 0 and 1 inclusive. See "Logical Points" heading in Remarks below.
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified object is a and whether it contains the same values as this . (Overrides ValueType.Equals(Object).)|
|Equals(Point)||Compares two structures for equality.|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Returns the hash code for this . (Overrides ValueType.GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString()||Creates a String representation of this . (Overrides ValueType.ToString().)|
|ToString(IFormatProvider)||Creates a String representation of this .|
The structure is typically used to specify location. Depending on the context, the location might be either in the overall Windows Phone content area frame, or might be within the frame of reference for a specific element.
is the type that is returned from a call to the GetPosition method used in event handlers. Also, a is used for some properties such as To and From of a PointAnimation. A can also be used as the qualifier for performing a hit test.
X and Y for a can be non-integer values in terms of permitted values. See "Logical Points" section below for information on certain usages that expect and use non-integer values extensively.
Depending on the specific property where the is applied, X and Y can possibly be negative. Typically, this results in a definition that specifies a coordinate outside of the Windows Phone content area, unless there is additional translation. Many properties, for example EllipseGeometry.RadiusX, will reject a with negative X and Y.
The programmatic upper limit for values is not PositiveInfinity, it is a lower number (approximately 1,000,000) that is enforced by the Windows Phone native code.
Point Values in XAML
For XAML attributes that take a , you can specify an X,Y value pair as a string. The delimiter between X and Y can be either a comma (plus optionally zero or more spaces), or one or more spaces. The common convention for points is to use a comma delimiter. A type converter converts the formatted string to a structure.
Using a comma as a separator in an X,Y string can clash with cultural settings where the comma character is the decimal separator if a decimal value is entered as a string. For usages of a that are representing points in the absolute coordinate space (usages that are not a logical point), you generally should use integer values for X and Y. When specifying a attribute in XAML, use a period (.) for noninteger X or Y values of a , even if that is not the convention in either the culture being developed under, or the target culture of the application.
structures cannot be declared as resources in a ResourceDictionary.
Some usages of the structure in Windows Phone do not relate to coordinate frames of reference directly. Instead, these are logical points, where the value of X,Y are each expected to be between 0 and 1 inclusive. This is a major scenario for why the X,Y values can be floating-point values rather than restricted to integer values. The logical point values are used when specifying certain values that have an X and Y dimension, and the values are then mapped to a presentation or behavior where the actual coordinates for presentation or behavior might be specified by a different property. Examples of the logical point usage are the values of a KeySpline, which can be used to pace an animation, and some values of LinearGradientBrush and RadialGradientBrush while using the default RelativeToBoundingBox mode. A property of structure that is a logical point mapping might invalidate values less than 0, or greater than 1, but this depends on the specific property.