Code Monkey home page Code Monkey logo

bertuzzi.maui.pinchzoomimage's Introduction

Bertuzzi.MAUI.PinchZoomImage

Zoom in on the image with the pinch of your fingers.

A simple way to zoom in and zoom out on your images with MAUI.

This is the component, works on iOS, Android

NuGet

Name Info
Bertuzzi.MAUI.PinchZoomImage NuGet

Platform Support

PinchZoomImage is a MAUI library.

Setup / Usage

Does not require additional configuration. Just install the package in the shared project and use.

You just need to add the reference in your xaml file.

  xmlns:pinch="clr-namespace:Bertuzzi.MAUI.PinchZoomImage;assembly=Bertuzzi.MAUI.PinchZoomImage"  

Control

Use with the image control

 <pinch:PinchZoom>
     <pinch:PinchZoom.Content>
         <Image Source="xxamarin.jpg" />
     </pinch:PinchZoom.Content>
 </pinch:PinchZoom>     

The complete example can be downloaded here: https://github.com/TBertuzzi/Bertuzzi.MAUI.PinchZoomImage/tree/master/PinchZoomImageMauiSample

Base on my package : https://github.com/TBertuzzi/Xamarin.Forms.PinchZoomImage

bertuzzi.maui.pinchzoomimage's People

Contributors

tbertuzzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bertuzzi.maui.pinchzoomimage's Issues

The library crashes when updated to .NET 7

I have noticed that the app crashed on Android when I upgraded the project to .NET 7. The root cause as follows:

Method not found: void Microsoft.Maui.Controls.TapGestureRecognizer.add_Tapped(System.EventHandler)

Getting TargetInvocationException

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.