Share via


PointerPoint 클래스

정의

단일 마우스, 펜/스타일러스 또는 터치 접점과 연결된 입력 포인터에 대한 기본 속성을 제공합니다.

public ref class PointerPoint sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PointerPoint final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PointerPoint
Public NotInheritable Class PointerPoint
상속
Object Platform::Object IInspectable PointerPoint
특성

예제

다음 예제에서는 PointerPoint 개체를 사용하여 다양한 포인터 속성을 쿼리합니다.

private string queryPointer(PointerPoint ptrPt)
{
    String details = "";

    switch (ptrPt.PointerDeviceType)
    {
        case PointerDeviceType.Mouse:
            details += "\nPointer type: mouse";
            break;
        case PointerDeviceType.Pen:
            details += "\nPointer type: pen";
            if (ptrPt.IsInContact)
            {
                details += "\nPressure: " + ptrPt.Properties.Pressure;
                details += "\nrotation: " + ptrPt.Properties.Orientation;
                details += "\nTilt X: " + ptrPt.Properties.XTilt;
                details += "\nTilt Y: " + ptrPt.Properties.YTilt;
                details += "\nBarrel button pressed: " + ptrPt.Properties.IsBarrelButtonPressed;
            }
            break;
        case PointerDeviceType.Touch:
            details += "\nPointer type: touch";
            details += "\nrotation: " + ptrPt.Properties.Orientation;
            details += "\nTilt X: " + ptrPt.Properties.XTilt;
            details += "\nTilt Y: " + ptrPt.Properties.YTilt;
            break;
        default:
            details += "\nPointer type: n/a";
            break;
    }

    details += "\nPointer Id: " + ptrPt.PointerId.ToString() +
        "\nPointer location: " + ptrPt.Position.X + ", " + ptrPt.Position.Y;

    return details;
}

설명

속성을 통해 액세스할 수 있는 확장 속성은 PointerPointProperties 를 참조 하세요.

PointerPoint 좌표 공간은 검색되는 컨텍스트에 따라 달라집니다. PointerRoutedEventArgs.GetCurrentPoint에서 검색하면 포인터의 좌표는 디바이스 독립적 픽셀에서 제공된 UIElement를 기준으로 합니다.

속성

FrameId

입력 프레임의 ID를 가져옵니다.

IsInContact

입력 장치(터치, 펜/스타일러스)가 디지타이저 표면을 아래로 누르고 있는지(터치) 또는 마우스 단추를 누를지 여부를 나타내는 값을 가져옵니다.

PointerDeviceType

입력 포인터와 연결된 입력 디바이스 유형을 가져옵니다.

PointerId

입력 포인터의 고유 식별자를 가져옵니다.

Position

입력 포인터의 위치를 가져옵니다.

Properties

입력 포인터에 대한 확장 정보를 가져옵니다.

Timestamp

입력이 발생한 시간을 가져옵니다.

메서드

GetTransformedPoint(IPointerPointTransform)

애플리케이션 정의 변환을 사용하여 현재 PointerPoint 를 변환하여 새 PointerPoint 개체를 검색합니다.

적용 대상

추가 정보