Stylus Sınıf
Tanım
Tablet kalemiyle genel bilgilere erişim sağlar.Provides access to general information about a tablet pen.
public ref class Stylus abstract sealed
public static class Stylus
type Stylus = class
Public Class Stylus
- Devralma
-
Stylus
Örnekler
Aşağıdaki örnek, ekran kalemi a 'nın sınırları dışında bıraksa bile, ekran kalemi koordinatlarını nasıl kaydedebileceğinizi gösterir TextBox .The following example demonstrates how to record the coordinates of the stylus, even if the stylus leaves the bounds of a TextBox. Bu örnek, bir TextBox Aranan olduğunu ve, textBox1
StylusDown StylusUp ve StylusMove olaylarının olay işleyicilerine bağlı olduğunu varsayar.This example assumes that there is a TextBox called textBox1
, and that the StylusDown, StylusUp, and StylusMove events are connected to event handlers.
void textbox1_StylusDown(object sender, StylusDownEventArgs e)
{
Stylus.Capture(textbox1);
}
void textbox1_StylusMove(object sender, StylusEventArgs e)
{
Point pos = e.GetPosition(textbox1);
textbox1.AppendText("X: " + pos.X + " Y: " + pos.Y + "\n");
}
void textbox1_StylusUp(object sender, StylusEventArgs e)
{
Stylus.Capture(textbox1, CaptureMode.None);
}
Private Sub textbox1_StylusDown(ByVal sender As Object, ByVal e As System.Windows.Input.StylusDownEventArgs) _
Handles textbox1.StylusDown
Stylus.Capture(textbox1)
End Sub
Private Sub textbox1_StylusMove(ByVal sender As Object, ByVal e As StylusEventArgs) _
Handles textbox1.StylusMove
Dim pos As Point = e.GetPosition(textbox1)
textbox1.AppendText("X: " & pos.X.ToString() & " Y: " & pos.Y.ToString() & vbLf)
End Sub
Private Sub textbox1_StylusUp(ByVal sender As Object, ByVal e As StylusEventArgs) _
Handles textbox1.StylusUp
Stylus.Capture(textbox1, CaptureMode.None)
End Sub
Alanlar
Özellikler
Captured |
Stilus 'ın bağlandığı öğeyi alır.Gets the element to which the stylus is bound. |
CurrentStylusDevice |
Kullanılmakta olan ekran kalemini temsil eden ekran kalemini alır.Gets the stylus that represents the stylus currently in use. |
DirectlyOver |
Doğrudan ekran kalemi altındaki öğeyi alır.Gets the element that is directly beneath the stylus. |
İliştirilmiş Özellikler
IsFlicksEnabled |
Hareketlerin etkinleştirilip etkinleştirilmeyeceğini gösteren bir değer alır veya ayarlar.Gets or sets a value indicating whether flicks are enabled. |
IsPressAndHoldEnabled |
Basma ve tutma özelliğinin etkinleştirilip etkinleştirilmeyeceğini gösteren bir değer alır veya ayarlar.Gets or sets a values indicating whether press and hold is enabled. |
IsTapFeedbackEnabled |
Geri bildirimde tap 'ın etkinleştirilip etkinleştirilmeyeceğini gösteren bir değer olup olmadığını alır veya ayarlar.Gets or sets whether a value indicating whether tap feedback is enabled. |
IsTouchFeedbackEnabled |
Dokunma geri bildirimi etkinleştirilip etkinleştirilmeyeceğini gösteren bir değer olup olmadığını alır veya ayarlar.Gets or sets whether a value indicating whether touch feedback is enabled. |
Yöntemler
İliştirilmiş Olaylar
GotStylusCapture |
Bir öğe ekran kalemi olaylarını yakaladığında gerçekleşir.Occurs when an element captures the stylus events. |
LostStylusCapture |
Bir öğe ekran kalemi olaylarını serbest bıraktığında gerçekleşir.Occurs when an element releases stylus events. |
PreviewStylusButtonDown |
Kullanıcı, ekran kalemi üzerindeki düğmelerden birine bastığında gerçekleşir.Occurs when the user presses one of the buttons on the stylus. |
PreviewStylusButtonUp |
Kullanıcı, ekran kalemi üzerindeki düğmelerden birini bıraktığında gerçekleşir.Occurs when the user releases one of the buttons on the stylus. |
PreviewStylusDown |
Kullanıcı ekran kalemi ucuyla tablette dokunduğunda gerçekleşir.Occurs when user touches the tip of the stylus to the tablet. |
PreviewStylusInAirMove |
Ekran kalemi, tabletin aralığı içinde (ancak dokunmadan) sonra taşınırsa oluşur.Occurs if the stylus moves while it is within range of (but not touching) the tablet. |
PreviewStylusInRange |
Ekran kalemi tablet aralığı içinde geldiğinde gerçekleşir.Occurs when the stylus comes within range of the tablet. |
PreviewStylusMove |
Ekran kalemi, tabletin dokunurken ne zaman geçerse oluşur.Occurs when the stylus moves while it is touching the tablet. |
PreviewStylusOutOfRange |
Ekran kalemi tablet aralığının dışına çıktığında gerçekleşir.Occurs when the stylus goes out of range of the tablet. |
PreviewStylusSystemGesture |
Kullanıcı bu ekran kalemiyle bir sistem hareketi yaptığında gerçekleşir.Occurs when the user makes a system gesture with this stylus. |
PreviewStylusUp |
Kullanıcı tablet kalemini tabletten çıktığında oluşur.Occurs when the user lifts the stylus from the tablet. |
StylusButtonDown |
Kullanıcı, ekran kalemi üzerindeki düğmelerden birine bastığında gerçekleşir.Occurs when the user presses one of the buttons on the stylus. |
StylusButtonUp |
Kullanıcı, ekran kalemi üzerindeki düğmelerden birini bıraktığında gerçekleşir.Occurs when the user releases one of the buttons on the stylus. |
StylusDown |
Kullanıcı ekran kalemi ucuyla tablette dokunduğunda gerçekleşir.Occurs when the user touches the tip of the stylus to the tablet. |
StylusEnter |
Ekran kalemi imleci bir öğenin sınırlarına girdiğinde gerçekleşir.Occurs when the stylus cursor enters the bounds of an element. |
StylusInAirMove |
Ekran kalemi, tablette yer aldığı ancak dokunmadan ne zaman kaymışken gerçekleşir.Occurs when the stylus moves while it is in range of, but not touching, the tablet. |
StylusInRange |
Ekran kalemi tablet aralığı içinde geldiğinde gerçekleşir.Occurs when the stylus comes within range of the tablet. |
StylusLeave |
Ekran kalemi imleci bir öğenin sınırları dışına çıktığında gerçekleşir.Occurs when the stylus cursor leaves the bounds of an element. |
StylusMove |
Ekran kalemi, tabletin dokunurken ne zaman geçerse oluşur.Occurs when the stylus moves while it is touching the tablet. |
StylusOutOfRange |
Ekran kalemi tablet aralığının dışına çıktığında gerçekleşir.Occurs when the stylus goes out of range of the tablet. |
StylusSystemGesture |
Kullanıcı bu ekran kalemiyle bir sistem hareketi yaptığında gerçekleşir.Occurs when the user makes a system gesture with this stylus. |
StylusUp |
Kullanıcı kalemi tablet PC 'den harekete geçirirse oluşur.Occurs when the user raises the stylus from the Tablet PC. |