StylusShape Class

StylusShape Class


Represents the tip of a stylus.

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

public ref class StylusShape abstract 


Gets the height of the stylus.


Gets the angle of the stylus.


Gets the width of the stylus.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The StylusShape specifies the shape, width, and height of the tip of a stylus. Methods such as M:System.Windows.Ink.StrokeCollection.Erase(System.Windows.Point[],System.Windows.Ink.StylusShape) and M:System.Windows.Ink.StrokeCollection.HitTest(System.Windows.Point[],System.Windows.Ink.StylusShape) use a StylusShape to determine the stylus tip of the hitting stroke. The EllipseStylusShape and RectangleStylusShape classes inherit from StylusShape.

This class is not typically used in XAML.

The following example demonstrates how to create a StylusShape and pass it to the GetIncrementalStrokeHitTester method to erase a portion of a Stroke. This example assumes that there is a IncrementalStrokeHitTester called eraseTester and that its StrokeHit event has been connected to the event handler defined in this example. To create a control that allows a user to erase ink, see How to: Erase Ink on a Custom Control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft