StylusPlugIn.OnStylusLeave(RawStylusInput, Boolean) 메서드

정의

커서가 요소의 경계를 벗어나면 펜 스레드에서 발생합니다.

protected:
 virtual void OnStylusLeave(System::Windows::Input::StylusPlugIns::RawStylusInput ^ rawStylusInput, bool confirmed);
protected virtual void OnStylusLeave(System.Windows.Input.StylusPlugIns.RawStylusInput rawStylusInput, bool confirmed);
abstract member OnStylusLeave : System.Windows.Input.StylusPlugIns.RawStylusInput * bool -> unit
override this.OnStylusLeave : System.Windows.Input.StylusPlugIns.RawStylusInput * bool -> unit
Protected Overridable Sub OnStylusLeave (rawStylusInput As RawStylusInput, confirmed As Boolean)

매개 변수

rawStylusInput
RawStylusInput

RawStylusInput 펜의 입력에 대한 정보가 들어 있는 A입니다.

confirmed
Boolean

true펜이 실제로 요소의 경계를 벗어나면 이고, 그렇지 않으면 . false

예제

다음은 커서가 요소의 경계를 StylusPlugIn 벗어나는 경우를 다시 설정하는 예제입니다.

// 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;
' 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
// 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;
    }
}
' 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

설명

이 메서드는 펜 스레드에서 발생하므로 성능에 영향을 주지 않도록 이 메서드에서 작업을 최소화합니다.

적용 대상