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

StrokeCollection.HitTest (Método) (Point, Double)

Returns a collection of strokes that intersect the specified area.

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

public StrokeCollection HitTest (
	Point point,
	double diameter
)
public StrokeCollection HitTest (
	Point point, 
	double diameter
)
public function HitTest (
	point : Point, 
	diameter : double
) : StrokeCollection
No se pueden utilizar métodos en XAML.

Parámetros

point

The Point to hit test.

diameter

The size of the area around the Point to hit test.

Valor devuelto

A collection of Stroke objects that intersect the specified point.

The following example demonstrates how to get the strokes that intersect the specified Point. This example assumes that there is an InkPresenter called presenter.

// Change the color of all the strokes at the specified position.
public void SelectStrokes(Point position)
{
    StrokeCollection selected = presenter.Strokes.HitTest(position, 5);

    foreach (Stroke s in selected)
    {
        s.DrawingAttributes.Color = Colors.Purple;
    }

}

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
Mostrar: