2018 Volume 1: Image Editor in Xamarin.Forms | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (179).NET Core  (28).NET MAUI  (214)Angular  (112)ASP.NET  (51)ASP.NET Core  (83)ASP.NET MVC  (90)Azure  (41)Black Friday Deal  (1)Blazor  (227)BoldSign  (15)DocIO  (24)Essential JS 2  (109)Essential Studio  (200)File Formats  (69)Flutter  (133)JavaScript  (226)Microsoft  (120)PDF  (82)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (946)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (45)Webinar  (52)Windows Forms  (61)WinUI  (71)WPF  (163)Xamarin  (160)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (9)Business intelligence  (55)Button  (4)C#  (158)Chart  (140)Chart of the week  (54)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (70)Development  (661)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (14)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (19)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (512)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (4)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (14)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (113)UI  (393)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (618)What's new  (334)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

2018 Volume 1: Image Editor in Xamarin.Forms

Thank you to those of our customers who provided valuable feedback for improving our image editor! We carefully considered your feedback and consequently improved aspects of the product such as most requested features, stability, and documentation this time. We are excited to share the new features we are including in our upcoming 2018 Volume 1 release for the image editor control in Xamarin.Forms:

  • Localization
  • Serialization
  • Cropping with aspect ratio
  • Moving shapes forward and backward
  • Dynamic adding and removing of toolbar items


Localization in image editor helps you build your application for a wider audience. You can set text specifically to the culture of your preference in your application. You can localize text in a toolbar item by simply setting the equivalent text in your required culture like in the following code snippet.

//File Location : ProjectName/Resources/Values/String.xml


<string name="reset">Reiniciar</string>

<string name="save">Salvar</string>


Following is a screen shot of image editor in Spanish.

Reset and save are localized to Spanish


If you need to save your UI edits (with all the shapes, paths, and annotated text) for an image so that you can work on the edits later by loading them, this is now possible in image editor. It supports serialization, in which you can save your edits as a stream and load them whenever you need later. The following code snippet shows how you can save and load serialized edits.


 SfImageEditor editor =new SfImageEditor();

 var stream= editor.SaveEdits();


 SfImageEditor editor =new SfImageEditor();


Saving the edits and loading them again

Cropping with aspect ratio

Image editor already supports cropping images, but now it supports cropping images with aspect ratio, and comes with some default ratios. You can also set or customize your own aspect ratios programmatically, which will be useful in creating ad banners and profile pictures on social networks. Below is a code snippet on cropping an image as a Facebook banner.

//Cropping to 3:2 

SfImageEditor editor =new SfImageEditor(); 

editor.ImageLoaded += (sender, args) => { 
    editor.ToggleCropping(3, 2); 

//Cropping to 3:1 

SfImageEditor editor =new SfImageEditor(); 

editor.ImageLoaded += (sender, args) => { 
    editor.ToggleCropping(3, 1); 


Moving the shapes forward or backward

Image editor already supports annotating shapes like rectangles, circles, and arrows. These shapes are arranged one over the other in chronological order when we add them to images, so there will often be a need to change this order while customizing edits. Image editor now supports this functionality and you can bring the required shape forward or backward as you desire.

//Bring to Front

 SfImageEditor editor =new SfImageEditor();

//Send to Back

 SfImageEditor editor =new SfImageEditor();

//Bring Forward

 SfImageEditor editor =new SfImageEditor();

//Send Backward

 SfImageEditor editor =new SfImageEditor();

Selected shapes can be sent backward or brought forward

Adding/removing toolbar items

Everyone loved our built-in toolbar for the image editor, but there were lot of requests for a way to add a new toolbar item or remove the existing toolbar items from the toolbar. We heard you! Now we support this functionality, and you can add your own toolbar item with an icon and text. For example, let’s say you need to share: you can add a toolbar item with a share icon and trigger an event for the toolbar item click to share the image. Following is a code snippet showing how we can add or remove a toolbar item.

SfImageEditor editor =new SfImageEditor();
HeaderToolBarItem item1 = new HeaderToolBarItem();
item1.Text = “Share”;

//To Add toolbar item

//To Remove toolbar item

Screenshot shows custom items added to the toolbar to depict the share icon and text

Zooming in UWP:

We provided support for zooming in Android and iOS in our last release and now this feature is available in UWP, as well.

We have demonstrated these new features to show you how handy our image editor control is in developing your customized, feature-rich applications. Syncfusion invites you to try out these features in the upcoming 2018 Volume 1 release, which is expected to roll out in mid-February. Please feel free to provide your valuable feedback in the comments section below.


Share this post:

Comments (1)

not able to set Cropping with aspect ratio
Crop method expect a rectangle type as parameter.

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed