StylusPoint.Equality Operator (StylusPoint, StylusPoint)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.


Compares two specified StylusPoint objects and determines whether they are equal.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public static bool operator ==(
	StylusPoint stylusPoint1,
	StylusPoint stylusPoint2


Type: System.Windows.Input.StylusPoint

The first StylusPoint to compare.

Type: System.Windows.Input.StylusPoint

The second StylusPoint to compare.

Return Value

Type: System.Boolean

true if the StylusPoint objects are equal; otherwise, false.

The following example checks two StylusPoint objects for equality. Because the X, Y, and PressureFactor properties on point1 and point2 are set to the same value, the "The two StylusPoint objects are equal." Message appears.

StylusPoint point1 = new StylusPoint();
StylusPoint point2 = new StylusPoint();

point1.X = 150;
point1.Y = 400;
point1.PressureFactor = 0.45f;

point2.X = 150;
point2.Y = 400;
point2.PressureFactor = 0.45f;
if (point1 == point2)
    MessageBox.Show("The two StylusPoint objects are equal.");
    MessageBox.Show("The two StylusPoint objects are not equal.");

.NET Framework
Available since 3.0
Return to top