Taal

Stylus.CurrentStylusDevice Eigenschap

Definitie

Hiermee haalt u de stylus op die de stylus vertegenwoordigt die momenteel in gebruik is.

public:
 static property System::Windows::Input::StylusDevice ^ CurrentStylusDevice { System::Windows::Input::StylusDevice ^ get(); };
public static System.Windows.Input.StylusDevice CurrentStylusDevice { [System.Security.SecurityCritical] get; }
public static System.Windows.Input.StylusDevice CurrentStylusDevice { get; }
[<get: System.Security.SecurityCritical>]
static member CurrentStylusDevice : System.Windows.Input.StylusDevice
static member CurrentStylusDevice : System.Windows.Input.StylusDevice
Public Shared ReadOnly Property CurrentStylusDevice As StylusDevice

Waarde van eigenschap

De StylusDevice stylus die momenteel in gebruik is.

Kenmerken

Voorbeelden

In het volgende voorbeeld ziet u hoe u de tekst kunt wissen die is geselecteerd met een omgekeerde stylus. In dit voorbeeld wordt ervan uitgegaan dat er een TextBox aangeroepen textBox1 gebeurtenis is en dat de StylusUpEvent gebeurtenis is verbonden met de gebeurtenis-handler.

void TextBoxStylusUp(object sender, StylusEventArgs e)
{
    StylusDevice currentStylus = Stylus.CurrentStylusDevice;

    if (currentStylus.Inverted)
    {
        string selectedText = textbox1.SelectedText;
        textbox1.SelectedText = "";
    }
}
Private Sub TextBoxStylusUp(ByVal sender As Object, ByVal e As StylusEventArgs) _
    Handles textbox1.StylusUp

    Dim currentStylus As StylusDevice = Stylus.CurrentStylusDevice

    If currentStylus.Inverted Then
        Dim selectedText As String = textbox1.SelectedText
        textbox1.SelectedText = ""
    End If

End Sub

Van toepassing op