Stylus.LostStylusCapture 연결된 이벤트

정의

요소에서 스타일러스 이벤트를 해제할 때 발생합니다.

see AddLostStylusCaptureHandler, and RemoveLostStylusCaptureHandler
see AddLostStylusCaptureHandler, and RemoveLostStylusCaptureHandler
see AddLostStylusCaptureHandler, and RemoveLostStylusCaptureHandler

예제

다음 예제에서는 스타일러스 이벤트를 캡처하고 해제할 때 TextBoxTextBox 배경색을 변경하는 방법을 보여 줍니다. 이 예제에서는 라는 textBox1텍스트 상자가 있고 및 LostStylusCapture 이벤트가 예제의 GotStylusCapture 이벤트 처리기에 연결되어 있다고 가정합니다.

void textbox1_LostStylusCapture(object sender, StylusEventArgs e)
{
    textbox1.Background = Brushes.White;
}

void textbox1_GotStylusCapture(object sender, StylusEventArgs e)
{
    textbox1.Background = Brushes.Red;
}
Private Sub textbox1_LostStylusCapture(ByVal sender As Object, ByVal e As StylusEventArgs) _
    Handles textbox1.LostStylusCapture

    textbox1.Background = Brushes.White

End Sub


Private Sub textbox1_GotStylusCapture(ByVal sender As Object, ByVal e As StylusEventArgs) _
    Handles textbox1.GotStylusCapture

    textbox1.Background = Brushes.Red

End Sub

설명

연결 된 이벤트입니다. WPF는 연결된 이벤트를 라우트된 이벤트로 구현합니다. 연결된 이벤트는 기본적으로 이벤트를 정의하지 않는 개체에서 처리되는 이벤트를 참조하는 데 사용되는 XAML 언어 개념입니다. WPF는 연결된 이벤트의 기능을 추가로 확장하여 경로를 트래버스할 수 있도록 합니다. 연결된 이벤트에는 코드에 직접 처리 구문이 없습니다. 코드에서 라우트된 이벤트에 대한 처리기를 연결하려면 지정된 Add*Handler 메서드를 사용합니다. 자세한 내용은 참조 하세요 연결 된 이벤트 개요합니다.

라우팅 이벤트 정보

식별자 필드 LostStylusCaptureEvent
라우팅 전략 버블링
대리자 StylusEventHandler

적용 대상

추가 정보