Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8840353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:26:47+00:00 2026-06-14T10:26:47+00:00

I am trying to implement a custom control which consists of a grid with

  • 0

I am trying to implement a custom control which consists of a grid with some canvas elements as children , When a swipe action is made on the grid , I am intended to preform some operation with the canvas elements .
I am unable to handle the swipe for the grid , i have posted the same in the
msdn – win8 Dev forum

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:26:48+00:00Added an answer on June 14, 2026 at 10:26 am

    I was in the same boat as you guys, since there was no samples out there on how this was done, but after perusing and scrutinizing the MSDN documentation on how a swipe gesture is implemented on a Windows 8 Store app using C#, this is what i came up with (and it works for my app which requires swiping up / down / left / right):

    First of all, instead of the GestureRecognizer, the Manipulation events need to be used, so on the grid that you want to handle the swiping (lets’ say you make it so that it takes the whole screen so it interprets the gestures) do the following:

    I called my grid swipingSurface and i’m handling manipulation modes for both the Y-axis and X-axis:

    swipingSurface.ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY;
    

    Then wire up the manipulation events that you want to be notified, in my case i just want to know then the manipulation started and when it ended:

    swipingSurface.ManipulationStarted += OnManipulationStarted;
    swipingSurface.ManipulationCompleted += OnManipulationCompleted;
    

    Do whatever you want on your manipulation started, such as getting the initial point if you want. But the actual trick is on the ManipulationCompleted event, in which you need to get the Velocities resulting from your gesture, as follows:

    public void OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e) {
        var velocities = e.Velocities;      
    }
    

    The ManipulationCompletedEventArgs Velocities property will bring back a struct of type ManipulationVelocities, which contains other properties inside:

    –Angular: The rotational velocity in degrees per millisecond.

    –Expansion: The expansion, or scaling, velocity in DIPs per millisecond.

    –Linear: The straight line velocity in DIPs per millisecond.

    I’m actually looking at the Linear velocity, which is a Point that contains X and Y values indicating the direction in which the gesture was performed; for example, if the swipe was upward, you will notice that the Y value is positive, and if its down the Y value is negative; the same goes for the X value, if the swipe is left, the X values are negative and if the swipe is right, the X values are positive, so you can play around with those values and check your swiping direction, final points, etc.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement drag and drop capability into a custom data grid control.
I'm trying to implement a custom control in C# and I need to get
Greetings, I'm trying to implement my custom TAB control. I'd like it to be
I'm trying to implement some custom model metadata in ASP.NET MVC 3. I can't
I'm trying to implement a custom tab bar which is scrollable and has paging
i am trying to implement a custom tab control in my win32 window, for
I am trying to implement a custom control using a RowClickableGridView class provided on
I am trying to implement ICommandSource on a custom control (similar to a button).
I did a custom button control in WPF and I am trying to implement
I have made custom login control for DNN (DotNetNuke). Now I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.