Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我只想知道我是否可以知道用户是单击了 Windows 运行时应用程序中可单击 ListView 或 GridView 控件中项目的左侧还是右侧。是否可以?如果是这样,怎么做?
Tapped您可以尝试使用的事件有一个您可以使用的GetPosition()方法TappedRoutedEventArgs,而该ItemClick事件没有。您也可以尝试在PointerPressed事件中获取位置,然后使用它ItemClick可能会更好地工作,因为Tapped可能不一定以与ItemClick.
Tapped
GetPosition()
TappedRoutedEventArgs
ItemClick
PointerPressed
确实,尽管这听起来像是应该避免的事情,因为用户可能不会期望根据他们单击项目的位置而出现不同的行为。