IncrementalLassoHitTester.SelectionChanged 이벤트

정의

올가미 경로가 잉크 Stroke를 선택하거나 선택 취소할 때 발생합니다.

public:
 event System::Windows::Ink::LassoSelectionChangedEventHandler ^ SelectionChanged;
public event System.Windows.Ink.LassoSelectionChangedEventHandler SelectionChanged;
member this.SelectionChanged : System.Windows.Ink.LassoSelectionChangedEventHandler 
Public Custom Event SelectionChanged As LassoSelectionChangedEventHandler 
Public Event SelectionChanged As LassoSelectionChangedEventHandler 

이벤트 유형

LassoSelectionChangedEventHandler

예제

다음 예제에서는 사용자 지정 컨트롤의 스트로크를 동적으로 선택 하는 방법에 설명 합니다. 전체 샘플을 보려면 방법: 사용자 지정 컨트롤에서 잉크 선택

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

적용 대상