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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to include custom cropping aspect in toolbar?

SfImageEditor allows you to include custom cropping aspect in toolbar. Crop sub toolbar has inbuilt cropping aspect toolbar item such as Free, Original, Square, 3:1, 1:3, 3:2, 2:3, 4:3, 3:4, 5:4 ,4:5, 16:9 and 9:16. You can add custom cropping aspect toolbar item to existing toolbar item collection.


Step 1: Create 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: To add custom cropping aspect toolbar item to existing toolbar item collection as like below,



Step 3: On Cliking custom toolbar item, ToolbarItemSelected event will be triggered. From this, you can get selected toolbar item as an argument.

Using ToggleCropping(5,7) method, cropping can be performed based on the ratio which is passed in the arguments as like below,




Sample Link:




Article ID: Published Date: Last Revised Date: Platform: Control:
8854 06/18/2018 06/29/2018 Xamarin.Forms SfImageEditor
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

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

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