다음을 통해 공유


StylusDevice.InAir 속성

정의

태블릿 펜이 디지타이저와 접촉하지 않고 위에 배치되었는지 여부를 가져옵니다.

public:
 property bool InAir { bool get(); };
public bool InAir { get; }
member this.InAir : bool
Public ReadOnly Property InAir As Boolean

속성 값

true펜이 위에 배치되어 있지만 디지타이저와 접촉하지 않으면 디지타이저입니다. 그렇지 않으면 . false 기본값은 false입니다.

예제

다음 예제에서는 속성을 보여 줍니다 InAir .

private void OnMouseMove(object sender, MouseEventArgs e)
{
    StylusDevice myStylusDevice = e.StylusDevice;

    if (myStylusDevice != null)
    {
        if (myStylusDevice.InAir)
        {
            textbox1.Text = "stylus moves in air";
        }
        else
        {
            textbox1.Text = "stylus moves with pen down";
        }
    }
}
Private Sub OnMouseMove(ByVal sender As Object, _
                        ByVal e As MouseEventArgs)

    Dim myStylusDevice As StylusDevice
    myStylusDevice = e.StylusDevice
    If Not IsNothing(myStylusDevice) Then
        If myStylusDevice.InAir = True Then
            textbox1.Text = "stylus moves in air"
        Else
            textbox1.Text = "stylus moves with pen down"
        End If
    End If
End Sub

적용 대상