"The Parameter is Incorrect"

Jul 28, 2011 at 6:16 AM

I have a new app that has a listbox with image controls displaying a feed from Flickr.  I have a second page ("ViewImage.xaml") that uses an Image control to show the large URI of a selected picture.  I added the Multitouch behavior (through Blend) and it worked great.  However, when I navigate back from the "ViewImage.xaml" page and then try to scroll the listbox I get an unhandled exception from the Multitouch assembly.  Here's the stacktrace:

   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   at MS.Internal.XcpImports.TouchFrameEventArgs_GetTouchPoints(TouchFrameEventArgs args, UIElement relativeTo)
   at System.Windows.Input.TouchFrameEventArgs.GetTouchPoints(UIElement relativeTo)
   at MultiTouch.Behaviors.WP7.MultiTouchBehavior.TouchFrameReported(Object sender, TouchFrameEventArgs e)
   at System.Windows.Input.Touch.OnTouch(Object sender, TouchFrameEventArgs e)
   at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)

Any suggestions?  This is a 7.0 targeted app and I downloaded just the .msi from Codeplex.

Thank you,


Jul 28, 2011 at 7:26 PM
Edited Jul 28, 2011 at 7:27 PM

Hi Scott,

instead of using the installer (which is only provided for backward compatibility) you should use the behavior contained in the sample project "SilverlightWP7MultiTouch.sln" which supports Windows Phone 7 multi-page applications.



Dec 17, 2012 at 5:00 PM

I solve this by doing the following    


var behaviors = System.Windows.Interactivity.Interaction.GetBehaviors(ImgZoom);     //ImgZoom image control