IncrementalLassoHitTester Klasa

Definicja

Dynamiczne trafienie Stroke testowe z lasso.

public ref class IncrementalLassoHitTester : System::Windows::Ink::IncrementalHitTester
public class IncrementalLassoHitTester : System.Windows.Ink.IncrementalHitTester
type IncrementalLassoHitTester = class
    inherit IncrementalHitTester
Public Class IncrementalLassoHitTester
Inherits IncrementalHitTester
Dziedziczenie
IncrementalLassoHitTester

Przykłady

W poniższym przykładzie pokazano, jak dynamicznie wybierać pociągnięcia w niestandardowej kontrolce. Aby zapoznać się z całym przykładem, zobacz How to: Select Ink from a Custom Control (Instrukcje: wybieranie pisma odkowego z kontrolki niestandardowej)

void selectionTester_SelectionChanged(object sender,
    LassoSelectionChangedEventArgs args)
{
    // Change the color of all selected strokes to red.
    foreach (Stroke selectedStroke in args.SelectedStrokes)
    {
        selectedStroke.DrawingAttributes.Color = Colors.Red;
        selectedStrokes.Add(selectedStroke);
    }

    // Change the color of all unselected strokes to 
    // their original color.
    foreach (Stroke unselectedStroke in args.DeselectedStrokes)
    {
        unselectedStroke.DrawingAttributes.Color = inkDA.Color;
        selectedStrokes.Remove(unselectedStroke);
    }
}
Private Sub selectionTester_SelectionChanged(ByVal sender As Object, _
    ByVal args As LassoSelectionChangedEventArgs)

    ' Change the color of all selected strokes to red.
    For Each selectedStroke As Stroke In args.SelectedStrokes
        selectedStroke.DrawingAttributes.Color = Colors.Red
        selectedStrokes.Add(selectedStroke)
    Next selectedStroke

    ' Change the color of all unselected strokes to 
    ' their original color.
    For Each unselectedStroke As Stroke In args.DeselectedStrokes
        unselectedStroke.DrawingAttributes.Color = inkDA.Color
        selectedStrokes.Remove(unselectedStroke)
    Next unselectedStroke

End Sub

Uwagi

IncrementalLassoHitTester Testy trafień uderzają, określając, czy ścieżka lasso go otacza. AddPoints Użyj metody w zdarzeniach stylus, aby dodać punkty do elementu IncrementalLassoHitTester. Po dodaniu punktów do IncrementalLassoHitTester zaznaczenia lub usunięcia zaznaczenia Strokezdarzenia program IncrementalLassoHitTester zgłasza SelectionChanged zdarzenie

Właściwości

IsValid

Pobiera, czy IncrementalHitTester test trafienia.

(Odziedziczone po IncrementalHitTester)

Metody

AddPoint(Point)

Dodaje element do Point elementu IncrementalHitTester.

(Odziedziczone po IncrementalHitTester)
AddPoints(IEnumerable<Point>)

Dodaje punkty do elementu IncrementalHitTester.

(Odziedziczone po IncrementalHitTester)
AddPoints(StylusPointCollection)

Dodaje określone StylusPoint obiekty do obiektu IncrementalHitTester.

(Odziedziczone po IncrementalHitTester)
AddPointsCore(IEnumerable<Point>)

Dodaje punkty do elementu IncrementalHitTester.

EndHitTesting()

Zwalnia zasoby używane przez usługę IncrementalHitTester.

(Odziedziczone po IncrementalHitTester)
Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera bieżące wystąpienie.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
OnSelectionChanged(LassoSelectionChangedEventArgs)

SelectionChanged Zgłasza zdarzenie.

ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Zdarzenia

SelectionChanged

Występuje, gdy ścieżka lasso wybiera lub usuwa zaznaczenie pisma odwrotowego Stroke.

Dotyczy