IncrementalLassoHitTester.SelectionChanged Evento
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Ocorre quando o caminho de Laço marca ou desmarca um Stroke de tinta.
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
Tipo de evento
Exemplos
O exemplo a seguir demonstra como selecionar dinamicamente traços em um controle personalizado. Para obter todo o exemplo, consulte Como: Selecionar Tinta de um controle personalizado
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