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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable Toggle cropping in ImageLoaded event

By default, In SfImageEditor, ToggleCropping method allow us to enable or disable cropping region over the image. From the below sample we can see how to enable the cropping region while initially loading the SfImageEditor. We can achieve this by using ImageLoaded event.

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: Call the ToggleCropping method while ImageLoaded event get fired. Please refer the following code snippet.

Code Snippet:

 

Sample link:

 

http://www.syncfusion.com/downloads/support/directtrac/general/ze/IESample1742806067.zip             

Article ID: Published Date: Last Revised Date: Platform: Control:
8933 07/10/2018 07/10/2018 Xamarin.Forms SfImageEditor
Did you find this information helpful?
Comments
Marian Grzesik Aug 31, 2018

When I use the code above, the controls shows the cropping view, but the header disappers, because the image covers the header, and I can't save the image. I've tried diffrent functions, to show the header like:


editor.ToolbarSettings.IsVisible = true;

editor.ToolbarSetting.HeaderToolbarHeight = 40;


It shows the header, but the upper part of the croping area is hidden.

I think it is a bug. I don't expect, that the Header disapears, when I switch to the cropping view.

Reply
Add Comment
You must log in to leave a comment

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