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 use Image Editor as signature?

Platform: Xamarin.Forms |
Control: SfImageEditor

Signature pads are used for users who often need to add signatures in documents. You can achieve this by using image editor. By using image editor control, you can achieve free hand drawing, erase the content, perform Undo, Redo, reset options, and save as image to device’s gallery.


Step 1: Create an image editor sample with all necessary assemblies.


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




Step 2: Create an instance for image editor. By default, image editor loads without image.


The following code snippet illustrates how to achieve this method by using image editor.



<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
    <imageeditor:SfImageEditor Grid.RowSpan="6" x:Name="editor" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">     
    <Button WidthRequest="50" Image="Reset.png" Clicked="Reset_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="0" HorizontalOptions="End" VerticalOptions="Center"/>
    <Button WidthRequest="50" Image="Save.png" Clicked="Save_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="1" HorizontalOptions="End" VerticalOptions="Center"/>
    <Button WidthRequest="50" Image="Pen.png" Clicked="Pen_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="2" HorizontalOptions="End" VerticalOptions="Center"/>
    < Button  WidthRequest="50" Image="Eraser.png" Clicked="Eraser_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="3" HorizontalOptions="End" VerticalOptions="Center"/>
    < Button WidthRequest="50" Image="Redo.png" Clicked="Redo_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="4" HorizontalOptions="End" VerticalOptions="Center"/>
    < Button WidthRequest="50" Image="Undo.png" Clicked="Undo_Clicked" BorderRadius="20" BorderWidth="3" BackgroundColor="Transparent" Grid.Row="5" HorizontalOptions="End" VerticalOptions="Center"/>      






    public partial class SfimageEditor : ContentPage
        public SfimageEditor()
            this.editor.ToolbarSettings.IsVisible = false;
        public void Pen_Clicked(object sender, EventArgs e)
        public void Undo_Clicked(object sender, System.EventArgs e)
        public void Redo_Clicked(object sender, System.EventArgs e)
        public void Reset_Clicked(object sender, System.EventArgs e)
        public void Save_Clicked(object sender, System.EventArgs e)
        public void Eraser_Clicked(object sender, System.EventArgs e)
            editor.AddShape(Syncfusion.SfImageEditor.XForms.ShapeType.Path, new Syncfusion.SfImageEditor.XForms.PenSettings() { Color = Color.White, StrokeWidth = 20 });


Sample Link:












Screen Shot:



2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
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