2

私はユニバーサル Windows アプリに取り組んでいます。Listboxitems に EventTrigger を追加しました。

<Interactivity:Interaction.Behaviors>
  <Core:EventTriggerBehavior EventName="Tapped">
    <Core:InvokeCommandAction Command="{Binding GoToHotelsCommand}"/>
  </Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>

EventName="Tapped" を使用すると、本来の動作を実行します。しかし、EventName="PointerPressed" を使用すると、何もトリガーされません。「タップ」トリガーは私の問題を解決しますが、ポインターが押された状態で機能しない理由が知りたいです。ポインターが押されたときにトリガーされるポインターが押されたイベントトリガーの目的ではありませんか? それとも私は何かを逃していますか?

4

1 に答える 1

4

実際にイベントTappedのオン/後に発生しPointerReleasedます...

答えはここにあります:

SomeButton.AddHandler(PointerPressedEvent, new PointerEventHandler(SomeButton_PointerPressed), true); 
于 2016-06-01T16:51:51.287 に答える