Are Click, Tapped, and PointerPressed synonymous in WinRT-XAML?

后端 未结 4 2074
攒了一身酷
攒了一身酷 2020-11-29 08:09

Does it matter whether I create event handlers for PointerPressed, Click, or Tapped?IOW, is there any functional difference between the following:

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 08:53

    You should use Click for Buttons (and ListView, Hyperlink, MenuFlyoutItem, ContentDialog, etc). Tapped is just a pointer event, so it doesn’t get invoked if you use a keyboard, or access key, or automation.

提交回复
热议问题