Cliquez pour évaluer et commenter
MSDN
MSDN Library
Développement .NET
Versions précédentes
.NET Framework 3.0
Bibliothèque de classes
StylusPlugIn, classe
Méthodes StylusPlugIn
 OnStylusLeave, méthode

  Passer à l'affichage pour faible bande passante
Cette page est spécifique à
.NET Framework 3.0

D'autres versions sont également disponibles pour :
StylusPlugIn.OnStylusLeave, méthode
Occurs on a pen thread when the cursor leaves the bounds of an element.

Espace de noms: System.Windows.Input.StylusPlugIns
Assembly : PresentationCore (dans presentationcore.dll)

Visual Basic (Déclaration)
Protected Overridable Sub OnStylusLeave ( _
    rawStylusInput As RawStylusInput, _
    confirmed As Boolean _
)
Visual Basic (Utilisation)
Dim rawStylusInput As RawStylusInput
Dim confirmed As Boolean

Me.OnStylusLeave(rawStylusInput, confirmed)
C#
protected virtual void OnStylusLeave (
    RawStylusInput rawStylusInput,
    bool confirmed
)
C++
protected:
virtual void OnStylusLeave (
    RawStylusInput^ rawStylusInput, 
    bool confirmed
)
J#
protected void OnStylusLeave (
    RawStylusInput rawStylusInput, 
    boolean confirmed
)
JScript
protected function OnStylusLeave (
    rawStylusInput : RawStylusInput, 
    confirmed : boolean
)
XAML
Vous ne pouvez pas utiliser des méthodes dans XAML.

Paramètres

rawStylusInput

A RawStylusInput that contains information about input from the pen.

confirmed

true if the pen actually left the bounds of the element; otherwise, false.

This method occurs on a pen thread, so minimize work in this method to avoid impacting performance.

The following example resets the StylusPlugIn when the cursor leaves the bounds of the element.

Visual Basic
    ' StylusPointCollection that contains the stylus points of the current
    ' stroke.
    Private points As StylusPointCollection

    ' Keeps track of the stylus to check whether two styluses are used on the
    ' digitizer.
    Private currentStylus As Integer
<span space="preserve">...

</span>    ' If the element loses focus, stop collecting the points and don't
    ' perform gesture recognition.
    Protected Overrides Sub OnStylusLeave(ByVal rawStylusInput As RawStylusInput, ByVal confirmed As Boolean)

        If confirmed Then
            ' Clear the StylusPointCollection
            points = Nothing
            currentStylus = 0
        End If

    End Sub 'OnStylusLeave
C#
        // StylusPointCollection that contains the stylus points of the current
        // stroke.
        StylusPointCollection points;

        // Keeps track of the stylus to check whether two styluses are used on the
        // digitizer.
        int currentStylus;
<span space="preserve">...

</span>        // If the element loses focus, stop collecting the points and don't
        // perform gesture recognition.
        protected override void OnStylusLeave(RawStylusInput rawStylusInput, bool confirmed)
        {
            if (confirmed)
            {
                // Clear the StylusPointCollection
                points = null;
                currentStylus = 0;
            }
        }

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0
Contenu de la communauté   Qu'est-ce que le Contenu de la communauté ?
Ajouter du contenu RSS  Annotations
Processing
© 2009 Microsoft Corporation. Tous droits réservés. Conditions d'utilisation  |  Marques  |  Confidentialité
Page view tracker