Esta documentación está archivada y no tiene mantenimiento.

StylusShape (Clase)

Represents the tip of a stylus.

Espacio de nombres: System.Windows.Ink
Ensamblado: PresentationCore (en presentationcore.dll)
Espacio de nombres XML:

public abstract class StylusShape
public abstract class StylusShape
public abstract class StylusShape
 This class is not typically used in XAML. 

The StylusShape specifies the shape, width, and height of the tip of a stylus. Methods such as Erase and HitTest use a StylusShape to determine the stylus tip of the hitting stroke. The EllipseStylusShape and RectangleStylusShape classes inherit from StylusShape.

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.

// Prepare to collect stylus packets. Get the 
// IncrementalHitTester from the InkPresenter's 
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)

    EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
    eraseTester = 
    eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);


Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0