Hiding Toolbars SfImageEditor

Hi,

I am trying to hide the top and bottom toolbar for the SfImageEditor using Xamarin Forms.
On iOS everything works fine, but on Android the bottom toolbar is still visible.

Version SfImageEditor is 18.4.0

In the XAML I  use:

ToolbarSettings.IsVisible="false"
  
   
Any help will be appreciated.

Thnx,
Hendrik Jan

7 Replies 1 reply marked as answer

SS Sridevi Sivakumar Syncfusion Team February 11, 2021 09:02 AM UTC

Hi Hendrik Jan Schuurkamp,

Greetings from Syncfusion.

We have checked the reported query with SfImageEditor control, and the toolbar is disabled properly on all the platforms. Please find the tested sample from below link.

Sample link: https://www.syncfusion.com/downloads/support/forum/162416/ze/ImageEditor_Sample2104027970

Code snippet[XAML]: 
 
 <imageeditor:SfImageEditor Source="{Binding Image}" >  
   <imageeditor:SfImageEditor.ToolbarSettings>  
        <imageeditor:ToolbarSettings IsVisible="False"/>  
   </imageeditor:SfImageEditor.ToolbarSettings>
 </imageeditor:SfImageEditor>  
Tested device details:
MI A3,
Android OS version : 10.

Tested SfImageEditor version: 18.4.0.42

Screenshot:


So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?

Can you please provide detailed information on the reported query? 
·       Can you please share the issue reproducing platform and video? 
·       If the issue is not reproduced in the above sample, please revert us by modifying the sample based on your application along with the replication procedure.
·       Can you share the Xamarin.Forms and also device configuration details?

Let us know if you need any further assistance.

Regards,
Sridevi S.
 
 
 



HJ Hendrik Jan Schuurkamp February 16, 2021 01:36 PM UTC

Thank you for your reaction.

I see the problem occurs when I want top start the page with the Image in Cropping mode as a circle.
Therefore, in the xaml I added the Image_loaded event and code in the code behind file for catching the event. See the attachments.

My purpose is to start the page with the cropping circle for the image without any toolbar (top and bottom)

Any help will be appreciated.

Thnx,
Hendrik Jan

Attachment: SfImageEditor_b694c554.zip


HJ Hendrik Jan Schuurkamp replied to Sridevi Sivakumar February 16, 2021 07:46 PM UTC

Hi Hendrik Jan Schuurkamp,

Greetings from Syncfusion.

We have checked the reported query with SfImageEditor control, and the toolbar is disabled properly on all the platforms. Please find the tested sample from below link.

Sample link: https://www.syncfusion.com/downloads/support/forum/162416/ze/ImageEditor_Sample2104027970

Code snippet[XAML]: 
 
 <imageeditor:SfImageEditor Source="{Binding Image}" >  
   <imageeditor:SfImageEditor.ToolbarSettings>  
        <imageeditor:ToolbarSettings IsVisible="False"/>  
   imageeditor:SfImageEditor.ToolbarSettings>
 imageeditor:SfImageEditor>  
Tested device details:
MI A3,
Android OS version : 10.

Tested SfImageEditor version: 18.4.0.42

Screenshot:


So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?

Can you please provide detailed information on the reported query? 
·       Can you please share the issue reproducing platform and video? 
·       If the issue is not reproduced in the above sample, please revert us by modifying the sample based on your application along with the replication procedure.
·       Can you share the Xamarin.Forms and also device configuration details?

Let us know if you need any further assistance.

Regards,
Sridevi S.
 
 
 


editor.ToggleCropping(false, 3); 
    iOS: the cropping view starts with a rectangle
    Android: the cropping view starts with a rectangle , no toolbars


editor.ToggleCropping(true, 3);
    iOS: the cropping view starts with a circle, no toolbars (that is what I want to achieve)
    Android: the cropping view starts with a circle, but with bottomtoolbar


SS Sridevi Sivakumar Syncfusion Team February 17, 2021 10:15 AM UTC

Hi Hendrik Jan Schuurkamp,

We have analyzed your requirement and you can achieve this by calling ToggleCropping(Rectangle, bool) method instead ToggleCropping(bool, int) as per the below code snippet.

Code snippet[XAML]
 
        <imageeditor:SfImageEditor Source="{Binding Image}" x:Name="editor" ImageLoaded="editor_ImageLoaded"> 
            <imageeditor:SfImageEditor.ToolbarSettings> 
                <imageeditor:ToolbarSettings IsVisible="False"/> 
            </imageeditor:SfImageEditor.ToolbarSettings> 
        </imageeditor:SfImageEditor> 

[C#] 
        private void editor_ImageLoaded(object sender, Syncfusion.SfImageEditor.XForms.ImageLoadedEventArgs args) 
        { 
            editor.ToggleCropping(new Rectangle(), true); 
        } 

Please find the description for the argument in this ToggleCropping method.

Rectangle -> Represents the region of crop.
 
Bool         - >True to crop in elliptical shape, false otherwise.

Screenshot:


Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ImageEditor_Sample1660993248

For more information about the SfImageEditor cropping
https://help.syncfusion.com/xamarin/image-editor/crop

Let us know if you need any further assistance.

Regards,
Sridevi S.
 
 



HJ Hendrik Jan Schuurkamp February 22, 2021 01:34 PM UTC

Thank you for your reply.

The solution is almost there. Because the image must be a perfect circle, I would like to remove the handles on the right, top, left and bottom. So, only the handles in the corners of the square are there. Otherwise it is possible to make an ellipse in stead of a perfect circle.

Do you have any suggestions?

Greetings,
Hendrik Jan


MK Muneesh Kumar G Syncfusion Team February 23, 2021 01:55 PM UTC

Hi Hendrik Jan Schuurkamp, 
 
We have analyzed your requirement and we have achieved the perfect circle by calling Crop method along with ToggleCropping method as per the below code snippet.  
 
Code snippet. 
 
private void editor_ImageLoaded(object sender, Syncfusion.SfImageEditor.XForms.ImageLoadedEventArgs args) 
        { 
            editor.ToggleCropping(new Rectangle(), true); 
            editor.Crop(); 
        } 
 
 
Please find the output screenshot below.  
 
 
We have modified our sample based on this, please the sample from the below link.  
 
 
In iOS, currently we have problem with perfect circle making without handles. So, we have created internal bug report for that. This problem will be resolved in upcoming weekly NuGet, which is expected to be rolled out on March 2, 2021. 
 
Regards, 
Muneesh Kumar G 



MK Muneesh Kumar G Syncfusion Team February 24, 2021 09:16 AM UTC

Hi Hendrik Jan Schuurkamp,  
  
We have resolved the perfect circle problem in iOS in sample level. As we are calling ToggleCrop and Crop method immediately, we were unable to get cropping rect. We have resolved this problem calling Crop method in 50 milliseconds delay as per the below code snippet. So calling Crop method after calling ToggleCropping method with 50 milli seconds delay, you can view perfect circle in all platforms.  
  
Code snippet.  
  
private async void Editor_ImageLoaded(object sender, Syncfusion.SfImageEditor.XForms.ImageLoadedEventArgs args)
{
editor.ToggleCropping(new Rectangle(), true);
await Task.Delay(50);
editor.Crop();
}
 
  
 
 
Please check and let us know if you have any other queries.   
  
Regards,  
Muneesh Kumar G  
 


Marked as answer
Loader.
Up arrow icon