0
我有一个容器控件正在处理PointerPressed和PointerMoved事件。检测哪个子控件收到指针*事件
该容器包含一组按钮。
在处理事件时,我怎样才能确定哪个按钮实际接收到它?
mainPage.AddHandler(PointerPressedEvent, new PointerEventHandler(pointerPressedHandler), true);
private void pointerPressedHandler(object sender, PointerRoutedEventArgs e)
{
var p = e.GetCurrentPoint(null); // maybe can be done using position info?
var s = e.OriginalSource as Border; // OriginalSource is a Border, not the Button, and I don't seem to be able to get to the Button from the Border
// todo - determine which button was clicked
}