Stylus.StylusInAirMove Evento associato
Definizione
Si verifica se lo stilo si sposta mentre è nel campo del tablet (ma non lo tocca).Occurs when the stylus moves while it is in range of, but not touching, the tablet.
see AddStylusInAirMoveHandler, and RemoveStylusInAirMoveHandler
see AddStylusInAirMoveHandler, and RemoveStylusInAirMoveHandler
see AddStylusInAirMoveHandler, and RemoveStylusInAirMoveHandler
Esempio
Nell'esempio seguente viene illustrato come determinare l'elemento su cui è posizionato lo stilo.The following example demonstrates how to determine which element the stylus is positioned over. In questo esempio si presuppone che esista un oggetto TextBox chiamato textBox1
e che l' StylusInAirMove evento sia connesso al gestore dell'evento.This example assumes that there is a TextBox called textBox1
and that the StylusInAirMove event is connected to the event handler.
void Window1_StylusInAirMove(object sender, StylusEventArgs e)
{
textbox1.AppendText(Stylus.DirectlyOver.ToString() + "\n");
}
Private Sub Window1_StylusInAirMove(ByVal sender As Object, ByVal e As StylusEventArgs) _
Handles Me.StylusInAirMove
Dim element As Object
element = CType(Stylus.DirectlyOver, Object)
textbox1.AppendText(element.ToString() & vbLf)
End Sub
Commenti
Si tratta di un evento associato.This is an attached event. WPFWPF implementa eventi associati come eventi indirizzati.implements attached events as routed events. Un evento associato è, fondamentalmente, un XAMLXAML concetto di linguaggio utilizzato per fare riferimento a eventi gestiti su oggetti che non sono, a loro volta, definiscono gli eventi.An attached event is, fundamentally, a XAMLXAML language concept used to reference events that are handled on objects that do not, themselves, define events. WPFWPF espande ulteriormente le funzionalità di un evento associato, consentendo l'attraversamento di una route.further expands an attached event's capabilities, allowing it to traverse a route. Gli eventi associati non hanno una sintassi di gestione diretta nel codice; per allineare gestori per un evento indirizzato nel codice, usare un metodo di gestione Add * designato.Attached events do not have a direct handling syntax in code; to attach handlers for a routed event in code, use a designated Add*Handler method. Per informazioni dettagliate, vedere Cenni preliminari sugli eventi associati.For details, see Attached Events Overview.
Informazioni evento indirizzatoRouted Event Information
Campo identificatoreIdentifier field | StylusInAirMoveEvent |
Strategia di routingRouting strategy | BubblingBubbling |
DelegatoDelegate | StylusEventHandler |