Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Equals Method (StylusPoint)
Collapse the table of content
Expand the table of content

StylusPoint.Equals Method (StylusPoint)

Returns a Boolean value that indicates whether the specified StylusPoint is equal to the current StylusPoint.

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

public bool Equals(
	StylusPoint value
)

Parameters

value
Type: System.Windows.Input.StylusPoint

The StylusPoint to compare to the current StylusPoint.

Return Value

Type: System.Boolean
true if the StylusPoint objects are equal; otherwise, false.

Implements

IEquatable<T>.Equals(T)

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 (point2.Equals(point1))
{
    MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
    MessageBox.Show("The two StylusPoint objects are not equal.");
}

.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