I'm trying to get a WPF multi-touch application working. One of the things I need in this app is the ability to independently scale in the X and Y directions - so if you move your fingers more horizontally than vertically, the touched object's width changes more than its height. Just going off of the BasicManipulation example that is found on all the MSDN Documentation for touch events such as ManipulationDelta ("Walkthrough: Creating Your First Touch Application" has the full code), I noticed that even when changing this line:
rectsMatrix.ScaleAt(e.DeltaManipulation.Scale.X, e.DeltaManipulation.Scale.X, e.ManipulationOrigin.X, e.ManipulationOrigin.Y);
to this:
rectsMatrix.ScaleAt(e.DeltaManipulation.Scale.X, e.DeltaManipulation.Scale.Y, e.ManipulationOrigin.X, e.ManipulationOrigin.Y);
...the rectangles still scale proportionately (despite a comment that says "Keep it square so use only the X value of Scale").
I added breakpoints and inspected ManipulationDeltaEventArgs, and noticed that ManipulationDelta.Scalealways has the same value for X and Y. Why is this so? And is there a different way for me to get the behavior I desire from using properties of ManipulationDeltaEventArgs?
I'm using Visual Studio 2012 and WPF v3.0.6920.5011, targeting .NET Framework 4.5.