We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create zoomable image in Xamarin Forms using SfImageEditor?

Platform: Xamarin.Forms |
Control: SfImageEditor |
Published Date: September 27, 2018 |
Last Revised Date: June 25, 2019

In SfImageEditor you can zoom and pan over an image.

 

Step 1: Create SfImageEditor sample with all necessary assemblies.

 

Please refer the below link to create a simple SfImageEditor sample along with the ways to configure it.

 

https://help.syncfusion.com/xamarin/sfimageeditor/getting-started

 

Step 2: Using PanningMode enum property available in SfImageEditor you can pan over an image by single finger or two fingers.

 

Code Snippet:

 

C#

 

public MainPage()
{
    InitializeComponent();
    editor.Source = ImageSource.FromResource("ImageEditor_GettingStarted.image.jpg");
    editor.ToolbarSettings.IsVisible = false;
    editor.PanningMode = PanningMode.SingleFinger;
}

 

XAML

 

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:ImageEditor_GettingStarted"
             x:Class="ImageEditor_GettingStarted.MainPage"
             xmlns:imageeditor="clr-namespace:Syncfusion.SfImageEditor.XForms;assembly=Syncfusion.SfImageEditor.XForms">
    
    <Grid>
        <imageeditor:SfImageEditor x:Name="editor" PanningMode="SingleFinger">
            <imageeditor:SfImageEditor.ToolbarSettings>
                <imageeditor:ToolbarSettings IsVisible="False"/>
            </imageeditor:SfImageEditor.ToolbarSettings>
        </imageeditor:SfImageEditor>
    </Grid>
    
</ContentPage>

 

Sample link:

 

http://www.syncfusion.com/downloads/support/directtrac/general/ze/ImageEditor_GettingStarted-1093406488.zip

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile