Explicit Conversion (Vector to Point)
Collapse the table of content
Expand the table of content

Vector Explicit Conversion (Vector to Point)


Creates a Point with the X and Y values of this vector.

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

public static explicit operator Point (
	Vector vector


Type: System.Windows.Vector

The vector to convert.

Return Value

Type: System.Windows.Point

A point with X- and Y-coordinate values equal to the X and Y offset values of vector.

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

private Point overloadedExplicitOperatorExample2()
    Vector vector1 = new Vector(20, 30);

    // Explicitly converts a Vector structure into a Point structure.
    // returnPoint is equal to (20, 30).
    Point returnPoint = (Point)vector1;

    return returnPoint;


.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft