jeudi 26 juin 2014

Windows Phone 8.0: Why does ManipulationDelta keep firing twice? (afaik, it's referenced just once.)


Vote count:

0




I've started a brand new Windows Phone 8.0 project and only added the following lines of code to try to isolate the problem. I've put a breakpoint at the ManipulationDelta event, and it reaches there fine. However, the ManipulationDelta event is called twice, before properly going through the ManipulationCompleted event once.


A quick background: I'm trying to use these two events to swipe from one screen to another and it works, but it's a bit slow and I wonder if the ManipulationDelta function being called twice has something to do with it.


I've tried removing ManipulationDelta from the XAML and leaving the ManipulationCompleted there, but then the code only goes to the ManipulationCompleted event. Tried it the other way as well, but ManipulationDelta still fires twice!


XAML:



<Grid x:Name="LayoutRoot" Background="Transparent"
ManipulationDelta="LayoutRoot_ManipulationDelta" ManipulationCompleted="LayoutRoot_ManipulationCompleted" >


C#



private void LayoutRoot_ManipulationDelta(object sender, System.Windows.Input.ManipulationDeltaEventArgs e)
{
return;
}

private void LayoutRoot_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
{
return;
}


Thank you in advance.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire