Stylus.PreviewStylusDown İliştirilmiş Olaylar
Tanım
Kullanıcı ekran kalemi ucuyla tablette dokunduğunda gerçekleşir.Occurs when user touches the tip of the stylus to the tablet.
see AddPreviewStylusDownHandler, and RemovePreviewStylusDownHandler
see AddPreviewStylusDownHandler, and RemovePreviewStylusDownHandler
see AddPreviewStylusDownHandler, and RemovePreviewStylusDownHandler
Örnekler
Aşağıdaki örnek, Kullanıcı ekran kalemiyle tablete dokunduğunda ekran kalemi yakalanmasının nasıl yapıldığını gösterir.The following example demonstrates how to ensure that the stylus is not captured when the user touches the stylus to the tablet. Bu örnek, PreviewStylusDown olayın olay işleyicisine bağlı olduğunu varsayar.This example assumes that the PreviewStylusDown event is connected to the event handler.
void Window1_PreviewStylusDown(object sender, StylusEventArgs e)
{
IInputElement capturedElement = Stylus.Captured;
if (capturedElement != null)
{
capturedElement.ReleaseStylusCapture();
}
}
Private Sub Window1_PreviewStylusDown(ByVal sender As Object, ByVal e As StylusDownEventArgs) _
Handles Me.PreviewStylusDown
Dim capturedElement As IInputElement = Stylus.Captured
If Not (capturedElement Is Nothing) Then
capturedElement.ReleaseStylusCapture()
End If
End Sub
Açıklamalar
Bu, ekli bir olaydır.This is an attached event. WPFWPF ekli olayları yönlendirilmiş olaylar olarak uygular.implements attached events as routed events. Bağlı bir olay, temel olarak, XAMLXAML olayları tanımlayan ve kendileri olmayan nesneler üzerinde işlenen olaylara başvurmak için kullanılan bir dil kavramıdır.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 ekli bir olayın yeteneklerini genişleterek bir rotaya çapraz geçiş yapmasına olanak tanır.further expands an attached event's capabilities, allowing it to traverse a route. Ekli olaylarda kodda doğrudan işleme sözdizimi yoktur; kodda yönlendirilmiş bir olaya yönelik işleyiciler iliştirmek için, belirlenmiş bir Add * Handler yöntemi kullanın.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. Ayrıntılar için bkz. ekli olaylara genel bakış.For details, see Attached Events Overview.
Yönlendirilmiş Olay BilgisiRouted Event Information
Tanımlayıcı alanıIdentifier field | PreviewStylusDownEvent |
Yönlendirme stratejisiRouting strategy | TünelTunneling |
TemsilciDelegate | StylusDownEventHandler |