How to stop a pivot when the Holding event is triggered?

Asked

Viewed 49 times

1

I’m hoping that when the event Holding is fired, I can block the movement of my pivot.

I’ve tried using the properties IsEnable and IsHitTestVisible, however I can still accomplish the Swipe during the holding company. The only property that worked was the IsLocked, however, it "erases" the header, behavior that is not desired for the application.

Someone already passed and managed to solve this problem?

1 answer

1

Take a look here and here

In both cases it is shown how to disable "Swipe" for Pivot. Behold:

public MainPage()
{
    InitializeComponent();
    Touch.FrameReported += (s, e) =>
    {
        if (e.GetPrimaryTouchPoint(slider1).Action == TouchAction.Up)
        { 
            pivot1.IsHitTestVisible = true; 
        }
    };
}

private void slider1_ManipulationStarted(object sender
    , ManipulationStartedEventArgs e)
{
    pivot1.IsHitTestVisible = false;
}

Another possibility is to set the property Useoptimizedmanipulationrouting="False".

  • i appreciate the answer. In case, I want to avoid for Windows Phone Runtime and the property UseOptimizedManipulationRouting as can be seen here, another point is that this does not resolve _ holding_, since it disables manipulations, preventing the ManipulationStarted be "dispatched".

  • Then, the second link (from where the above code was taken) is to Windows Phone. Anyway, here’s another example of how to disable Tap and Holding events on Windowsphone: http://blog.mjfnet.com/2010/07/16/windows-phone-7-detecting-tap-and-hold/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.