Hi,
I have a Grid^ myGrid in XAML and I am trying to attach an event handler for the PointerPressed by using AddHandler function as seen below:
myGrid->AddHandler(UIElement::PointerPressedEvent, ref new PointerEventHandler([](Object^ sender, PointerRoutedEventArgs^ e)
{
e->Handled = true;
}), true);
This will throw Platform::InvalidArgumentException. Could anyone shed some light on this?
Thanks,
Stefan