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

[HOW TO] SfImageEditor: add a single circle on image

Hello,
I would like to user the SfImageEditor control to add a single circle over an image by touching it, if possible without choosing the control.
I know how to hide the toolbar items and how to create a custom item, but how can I achieve my goal?

Would it be possible to create a single circle and delete the ones drawed previously?

Thanks in advance,
Matteo

1 Reply

Rachel A June 24, 2019 02:20 PM UTC

Hi Matteo, 
 
Thanks for contacting Syncfusion Support. 
 
You can achieve your requirement by using the AddShape method in SfImageEditor to add the shape dynamically without using any toolbar items. Please refer the below code snippet for your reference. 
 
[C#] 
 
imageEditor.AddShape(ShapeType.Circle, new PenSettings()); 
 
 
 
We have prepared the sample to add the shape when tapping the image. Please find the sample from the following location. 
 
 
Please refer the below UG link for how to add the shapes without using toolbar. 
 
 
Also, refer the below UG link for customizing the shape settings and shape rendering position. 
 
 
Regards, 
Rachel. 

Loader.
Live Chat Icon For mobile
Up arrow icon