Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit

I have a Pivot Control in my WP7 app that by nature responds to left and right swipes to move between the pivot items.

I then want to use the Flick Gesture on a UserControl (a small UI segment on my page) for something else.

My user control does handle the event but so does the Pivot control, so it navigates to the next item. I have not figured out how to stop the event when the usercontrol handles it.

Is it possible to use a sub control with the flick gesture within a WP7 Pivot Control?

eg:

        private void glBlinds_Flick(object sender, FlickGestureEventArgs e)
        {
                //do stuff
                e.Handled = true;
        }
like image 883
Rodney Avatar asked Jan 22 '23 06:01

Rodney


2 Answers

This solution posted recently seems to be working out for people for dealing with gesture conflicts on pano / pivot. You might like to check it out.

Preventing the Pivot or Panorama controls from scrolling

like image 165
Mick N Avatar answered Apr 07 '23 20:04

Mick N


The short answer is don't put a control which supports a gesture on top of another control which also supports the same gesture.

Please see this answer to a very similar question for a slightly longer response: WP7 Toggle switch in a Pivot control?

like image 23
Matt Lacey Avatar answered Apr 07 '23 20:04

Matt Lacey