Export (0) Print
Expand All

Point Explicit Conversion (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.

Namespace:  System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public static explicit operator Vector (
	Point point
)

Parameters

point
Type: System.Windows.Point

The point to convert.

Return Value

Type: System.Windows.Vector
A vector with an X value equal to the point's X value and a Y value equal to the point's Y value.

The following example shows how to explicitly convert a Point into a Vector.

private Vector overloadedExplicitOperatorVectorExample()
{

    Point point1 = new Point(10, 5);

    // Explicitly converts a Point structure into a Vector structure. 
    // returnVector is equal to (10,5).
    Vector returnVector = (Vector)point1;

    return returnVector;

}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft