1

Is it possible to generate fake ManipulationDeltaEventArgs? I have a touch app which allows users to pinch and zoom images. This works fine, but I'd like them to be able to zoom with buttons instead of pinch and zoom.

Since I have my working code using OnManipulationDelta, is there any way to map scaling using buttons to produce the ManipulationDeltaEventArgs programmatically? I'd then set the scale manipulation to what I want. It doesn't seem to be possible to do this directly but maybe there's some workaround?

Thanks

user814425
  • 605
  • 8
  • 19

1 Answers1

0

The correct way would be to create a method that contains the zooming code and call this method from the button click and from OnManipulationDelta.

Daniel Hilgarth
  • 171,043
  • 40
  • 335
  • 443
  • That's what I want to do, but I'm subclassing from ScatterViewItem and overriding OnManipulationDelta. My existing code calls base.OnManipulationDelta(e) and works fine when the user is pinching, but if they're using the buttons then 'e' doesn't exist. – user814425 Sep 07 '11 at 11:35
  • Just found this question, which looks interesting: [cutoms touch devices](http://stackoverflow.com/questions/4991536/faking-wpf-manipulation-events) – user814425 Sep 07 '11 at 11:38