TBertuzzi / Bertuzzi.MAUI.PinchZoomImage

🔍 Zoom in on the image with the pinch 👌 of your fingers or double tapping 👆
17 stars 6 forks source link

Getting TargetInvocationException #3

Open jrahma opened 1 year ago

jrahma commented 1 year ago

I am getting:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: void Microsoft.Maui.Controls.TapGestureRecognizer.add_Tapped(System.EventHandler)
  at at System.Reflection.ConstructorInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
  --- End of inner exception stack trace ---
  at at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
  at at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
  at at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
  at at System.Activator.CreateInstance(Type type, Boolean nonPublic)
  at at System.Activator.CreateInstance(Type type)
  at at Microsoft.Maui.Controls.Xaml.CreateValuesVisitor.Visit(ElementNode node, INode parentNode)
  at at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
  at at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
  at at Microsoft.Maui.Controls.Xaml.RootNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
  at at Microsoft.Maui.Controls.Xaml.XamlLoader.Visit(RootNode rootnode, HydrationContext visitorContext, Boolean useDesignProperties)
  at at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Assembly rootAssembly, Boolean useDesignProperties)
  at at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Boolean useDesignProperties)
  at at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, Type callingType)
  at at Microsoft.Maui.Controls.Xaml.Extensions.LoadFromXaml[MainPage](MainPage view, Type callingType)
  at ZoomImage.MainPage.InitializeComponent() in /Users/jassim/Projects/ZoomImage/ZoomImage/Microsoft.Maui.Controls.SourceGen/Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator/MainPage.xaml.sg.cs:34
  at ZoomImage.MainPage..ctor() in /Users/jassim/Projects/ZoomImage/ZoomImage/MainPage.xaml.cs:10
  at at System.Reflection.ConstructorInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
  --- End of inner exception stack trace ---
  at at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
  at at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
  at at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
  at at System.Activator.CreateInstance(Type type, Boolean nonPublic)
  at at System.Activator.CreateInstance(Type type)
  at at Microsoft.Maui.Controls.ShellContent.<>c__DisplayClass19_0.<Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent>b__0()
  at at Microsoft.Maui.Controls.ElementTemplate.CreateContent()
  at at Microsoft.Maui.Controls.Internals.DataTemplateExtensions.CreateContent(DataTemplate self, Object item, BindableObject container)
  at at Microsoft.Maui.Controls.ShellContent.Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent()
  at at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers()
  at at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad()
  at at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
  at at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
  at ZoomImage.Program.Main(String[] args) in /Users/jassim/Projects/ZoomImage/ZoomImage/Platforms/iOS/Program.cs:13
NandoLopes commented 1 year ago

I'm having the same error, can't use the component.

ivanjx commented 1 year ago

same as #1

ReticentRobot commented 1 year ago

Same issue here

jplepore commented 10 months ago

I have the same issue. The control is not currently usable with MAUI

Brosten commented 9 months ago

Sad to see this control seems abandoned. Thought I could replace my old XF-hack with this one...

JHiltunen commented 9 months ago

There is workaround for MAUI on #1 issue that will work