Monday, April 28, 2014

Thumb.PointerPressed += ThumbBottomRight_PointerPressed is not firing

Hi prasvenk,


It could be a limitation for XAML, XAML cannot route the tapped event to the methods.


But you could do something like below, should fire the tapped event while the mouse left click:



public MainPage()
{
this.InitializeComponent();
thumb.PointerPressed += thumb_PointerPressed;
thumb.AddHandler(UIElement.TappedEvent, new TappedEventHandler(thumb_tapped), true);
}

void thumb_PointerPressed(object sender, PointerRoutedEventArgs e)
{
throw new NotImplementedException();
}


private void thumb_tapped(object sender, TappedRoutedEventArgs e)
{
//implementation
}



--James


<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>

Thanks

MSDN Community Support



Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


No comments:

Post a Comment