Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Vector.op_Addition Method (Vector, Point)

Translates a point by the specified vector and returns the resulting point.

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

public static Point operator + (
	Vector vector,
	Point point
)
You cannot use methods in XAML.

Parameters

vector

The vector used to translate point.

point

The point to translate.

Return Value

The result of translating point by vector.

The following example shows how to use this operator (+) to translate a Point structure to a Vector structure.

private Point overloadedAdditionOperatorExample2()
{
    Point point1 = new Point(10, 5);
    Vector vector1 = new Vector(20, 30);
    Point pointResult = new Point();

    // Add the point to the vector.
    // pointResult is equal to (30,35).
    pointResult = point1 + vector1;

    return pointResult;

}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft