This documentation is archived and is not being maintained.

Point.Subtract Method (Point, Vector)

Subtracts the specified Vector from the specified Point and returns the resulting Point.

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

public static Point Subtract(
	Point point,
	Vector vector
You cannot use methods in XAML.


Type: System.Windows.Point

The point from which vector is subtracted.

Type: System.Windows.Vector

The vector to subtract from point.

Return Value

Type: System.Windows.Point
The difference between point and vector.

The following example shows how to subtract a Vector from a Point using the static Subtract method.

private Point subtractExample1()

    Point point1 = new Point(10, 5);
    Vector vector1 = new Vector(20, 30);

    // Subtracts a Vector from a Point using the static Subtract method 
    // and returns the difference as a Point. 
    // pointResult is equal to (-10, -25).
    Point pointResult = Point.Subtract(point1, vector1);

    return pointResult;


Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0