다음을 통해 공유


RightTappedRoutedEventArgs 클래스

정의

RightTapped 이벤트에 대한 이벤트 데이터를 제공합니다.

public ref class RightTappedRoutedEventArgs sealed : RoutedEventArgs
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RightTappedRoutedEventArgs final : RoutedEventArgs
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class RightTappedRoutedEventArgs final : RoutedEventArgs
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RightTappedRoutedEventArgs : RoutedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class RightTappedRoutedEventArgs : RoutedEventArgs
Public NotInheritable Class RightTappedRoutedEventArgs
Inherits RoutedEventArgs
상속
Object Platform::Object IInspectable RoutedEventArgs RightTappedRoutedEventArgs
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 코드 조각은 시나리오 1 -기본 입력 샘플의 입력 이벤트에서 가져옵니다.

Scenario1::Scenario1()
{
    InitializeComponent();

    // pointer press/release handlers
    pressedTarget.PointerPressed(this, &Scenario1::target_PointerPressed);
    pressedTarget.PointerReleased(this, &Scenario1::target_PointerReleased);

    // pointer enter/exit handlers
    enterExitTarget.PointerEntered(this, &Scenario1::target_PointerEntered);
    enterExitTarget.PointerExited(this, &Scenario1::target_PointerExited);

    // gesture handlers
    tapTarget.Tapped(this, &Scenario1::target_Tapped);
    tapTarget.DoubleTapped(this, &Scenario1::target_DoubleTapped);

    holdTarget.Holding(this, &Scenario1::target_Holding);
    holdTarget.RightTapped(this, &Scenario1::target_RightTapped);
}

void Scenario1::target_RightTapped(Windows::Foundation::IInspectable const&, Windows::UI::Xaml::Input::RightTappedRoutedEventArgs const& args)
{
    holdTarget.Background(Windows::UI::Xaml::Media::SolidColorBrush(Windows::UI::Colors::RoyalBlue()));
    holdTargetText.Text(L"Right-Tapped");
}
Scenario1::Scenario1()
{
    InitializeComponent();

    // pointer press/release handlers
    pressedTarget->PointerPressed += ref new PointerEventHandler(this, &Scenario1::target_PointerPressed);
    pressedTarget->PointerReleased += ref new PointerEventHandler(this, &Scenario1::target_PointerReleased);

    // pointer enter/exit handlers
    enterExitTarget->PointerEntered += ref new PointerEventHandler(this, &Scenario1::target_PointerEntered);
    enterExitTarget->PointerExited += ref new PointerEventHandler(this, &Scenario1::target_PointerExited);

    // gesture handlers
    tapTarget->Tapped += ref new TappedEventHandler(this, &Scenario1::target_Tapped);
    tapTarget->DoubleTapped += ref new DoubleTappedEventHandler(this, &Scenario1::target_DoubleTapped);

    holdTarget->Holding += ref new HoldingEventHandler(this, &Scenario1::target_Holding);
    holdTarget->RightTapped += ref new RightTappedEventHandler(this, &Scenario1::target_RightTapped);
}

void Scenario1::target_RightTapped(Object^ sender, RightTappedRoutedEventArgs^ e)
{
    holdTarget->Background = ref new SolidColorBrush(Windows::UI::Colors::RoyalBlue);
    holdTargetText->Text = "Right Tapped";
}
public Scenario1()
{
    this.InitializeComponent();

    // pointer press/release handlers
    pressedTarget.PointerPressed += new PointerEventHandler(target_PointerPressed);
    pressedTarget.PointerReleased += new PointerEventHandler(target_PointerReleased);

    // pointer enter/exit handlers
    enterExitTarget.PointerEntered += new PointerEventHandler(target_PointerEntered);
    enterExitTarget.PointerExited += new PointerEventHandler(target_PointerExited);

    // gesture handlers
    tapTarget.Tapped += new TappedEventHandler(target_Tapped);
    tapTarget.DoubleTapped += new DoubleTappedEventHandler(target_DoubleTapped);
    holdTarget.Holding += new HoldingEventHandler(target_Holding);
    holdTarget.RightTapped += new RightTappedEventHandler(target_RightTapped);
}

void target_RightTapped(object sender, RightTappedRoutedEventArgs e)
{
    holdTarget.Background = new SolidColorBrush(Windows.UI.Colors.RoyalBlue);
    holdTargetText.Text = "Right Tapped";
}
Public Sub New()
    Me.InitializeComponent()
    AddHandler pressedTarget.PointerPressed, New PointerEventHandler(AddressOf target_PointerPressed)
    AddHandler pressedTarget.PointerReleased, New PointerEventHandler(AddressOf target_PointerReleased)
    AddHandler enterExitTarget.PointerEntered, New PointerEventHandler(AddressOf target_PointerEntered)
    AddHandler enterExitTarget.PointerExited, New PointerEventHandler(AddressOf target_PointerExited)
    AddHandler tapTarget.Tapped, New TappedEventHandler(AddressOf target_Tapped)
    AddHandler tapTarget.DoubleTapped, New DoubleTappedEventHandler(AddressOf target_DoubleTapped)
    AddHandler holdTarget.Holding, New HoldingEventHandler(AddressOf target_Holding)
    AddHandler holdTarget.RightTapped, New RightTappedEventHandler(AddressOf target_RightTapped)
End Sub

Sub target_RightTapped(sender As Object, e As RightTappedRoutedEventArgs)
    holdTarget.Background = New SolidColorBrush(Windows.UI.Colors.RoyalBlue)
    holdTargetText.Text = "Right Tapped"
End Sub

설명

마우스를 마우스 오른쪽 단추로 클릭하거나 손가락, 펜 또는 유사한 포인터 디바이스가 Holding 이벤트를 완료하고 개체에 대한 보조 작업을 처리할 때마다 RightTapped 이벤트가 전송됩니다.

생성자

RightTappedRoutedEventArgs()

RightTappedRoutedEventArgs 클래스의 새 instance 초기화합니다.

속성

Handled

라우트된 이벤트를 처리됨으로 표시하는 값을 가져오거나 설정합니다. Handledtrue 값은 이벤트 경로를 따라 있는 대부분의 처리기가 동일한 이벤트를 다시 처리하지 못하도록 합니다.

OriginalSource

이벤트를 발생시킨 개체에 대한 참조를 가져옵니다. 앱 UI에서 선언된 요소가 아닌 컨트롤의 템플릿 부분입니다.

(다음에서 상속됨 RoutedEventArgs)
PointerDeviceType

연결된 입력 이벤트를 시작한 포인터 디바이스에 대한 PointerDeviceType 을 가져옵니다.

메서드

GetPosition(UIElement)

제공된 UIElement의 좌표 원점에서 선택적으로 계산되는 포인터 위치의 x 및 y 좌표를 반환합니다.

적용 대상

추가 정보