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

  • SEARCH
  • Home
  • 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 8700517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:11:07+00:00 2026-06-13T02:11:07+00:00

I have a multitouch WPF application and I’d like to do a rotation of

  • 0

I have a multitouch WPF application and I’d like to do a rotation of some stuff in it. The problem with ManipulationDelta, that ManipulationOrigin always is a center between 2 fingers, but I’d like to rotate with moving finger around fixed one.

Example: Finger1 fixed on screen and Finger2 goes around it, rotation with center in Finger1 point needed. Then Finger2 fixed and Finger1 goes around – now rotation with center in Finger2 point. All that stuff is done between one session of ManipulationStarted and ManipulationCompleted, because fingers is always on screen.

Now I’m trying to calculate vector between old position and new position, and rotate around finger, which position changed for minimum. It works, but not very well.

Any ideas how to get right rotation point at every moment in more nice way?

UPD:
Problem of MSDN example (Clemens’s code) – rectangle under Finger1 change it’s position, while Finger1 was fixed.

Finger1 and Finger2 on fixed on screen.
Two finger on screen

Finger2 rotated around Finger1
Finger2 rotated around FInger1

UPD2:
If I do rotation around e.Menipulators.First().GetPosition(RotatingControl) everything is OK. Problem, that finger can be changed and I need to know which finger is moving now. It’s not a hard problem. But sometimes both fingers rotates – in such case rotation should occurs around ManipulationOrigin

  • 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-13T02:11:08+00:00Added an answer on June 13, 2026 at 2:11 am

    When transforming an object by the values provided by ManipulationDeltaEventArgs, you would usually update a transform matrix. This could be the Matrix property of a MatrixTransform used as RenderTransform as shown below.

    <Rectangle ...>
        <Rectangle.RenderTransform>
            <MatrixTransform x:Name="transform"/>
        </Rectangle.RenderTransform>
    </Rectangle>
    

    This matrix would be updated according to translation, rotation and scaling delta values in a ManipulationDelta event handler like this:

    ManipulationDelta d = e.DeltaManipulation;
    Matrix m = transform.Matrix;
    m.Translate(d.Translation.X, d.Translation.Y);
    m.RotateAt(d.Rotation, e.ManipulationOrigin.X, e.ManipulationOrigin.Y);
    m.ScaleAt(d.Scale.X, d.Scale.Y, e.ManipulationOrigin.X, e.ManipulationOrigin.Y);
    transform.Matrix = m;
    

    This transformation will work perfectly with your fixed and moving fingers, except that it not only rotates, but also moves and scales the object. You could omit the scaling if you drop the m.ScaleAt(...) call and get a transform that is still near to what you want, as long as the distance between the fingers does not vary too much.

    However, there is still the movement, but that is something you can’t get rid of. Imagine you first have finger 1 fixed, then rotate by 180°, then fix finger 2 and rotate back again by 180°. Obviously the total rotation is zero, but the object has moved.

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

Sidebar

Related Questions

I would like to add some multitouch features to my javascript application when it
OK We have a Adobe Air (AS3) application that runs our WPF application. but
I have developed an Android application that is handling multitouch in a view. I
I have written an Android application that I am about to release, but I
I have an iPad application that uses the whole screen (that is, UIStatusBarHidden is
I have already implemented multitouch image rotation using standard iOS graphics library (Core Graphics).
How can I verify, that device support multitouch event? If device have resistent display,
I'm having some difficulties on my android application. I have some chronometers (4 or
I have a subclass of UITableViewController that works as expected. I'd like to capture
I have a little app that has been under development for some time. My

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.