How to stop by code after a shape is added?

Good afternoon,

once we start drawing the path with:

this.sfImageEditor.AddShape(ShapeType.Path, new PenSettings() { Color = Color.Black, StrokeWidth = 5f });

how can be stopped by code? From an external button for example?

Now keeps drawing until the image is reloaded.

Thanks in advance

1 Reply

RS Ramya Soundar Rajan Syncfusion Team April 29, 2020 01:22 PM UTC

Hi Marco, 
 
Currently we don't have support to stop the path drawing in code behind. We would like to suggest the workaround solution to resolve the problem by calling AddShape() and Delete() method at the same time in button click after drawing path as like in below code snippet . 
 
   imageEditor.AddShape(ShapeType.Circle); 
   imageEditor.Delete(); 
 
Please let us know if you have any concern. 
 
Regards, 
Ramya S 


Loader.
Up arrow icon