StylusPlugIn.OnStylusLeave(RawStylusInput, Boolean) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
커서가 요소의 경계를 벗어나면 펜 스레드에서 발생합니다.
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
설명
이 메서드는 펜 스레드에서 발생하므로 성능에 영향을 주지 않도록 이 메서드에서 작업을 최소화합니다.