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

Save Stroke Thickness and Color Settings

Hi,

is there a way to save the stroke thickness and the color of the pen when closing the editor? I would like to start the editor with the last selected settings.

Thank You in advance

3 Replies

MK Muneesh Kumar G Syncfusion Team July 31, 2019 09:43 AM UTC

Hi Frank, 
 
Greetings from Syncfusion.  
 
We have analyzed your requirement and you can achieve this by using serialization and deserialization method. In Serialization, you can save the current settings of the SfImageEditor. Then again load the previously stored settings by using deserialization method. 
 
Please check below user documentation for more details about that.  
 
 
Regards,
Muneesh Kumar G.    
 
 



FE Frank Effenberger August 2, 2019 06:45 AM UTC

Thank you for your consideration.

In Serialization, the editor stores all drawings and shapes I created on my picture. But I only want to store the drawing settings (stroke thickness and the color) for editing the next picture. Not the drawings and created shapes.


MK Muneesh Kumar G Syncfusion Team August 2, 2019 12:26 PM UTC

Hi Frank,  
 
Currently there is no direct support to save the drawing Settings of previously used editor control using Serialization method. But we can save the drawing settings of old editor JSON string in a database or text file and load again and can set in the new editor control settings. 
 
[C#]: 
 
ImageEditor.AddShape(Syncfusion.SfImageEditor.XForms.ShapeType.Path, new Syncfusion.SfImageEditor.XForms.PenSettings() {StrokeWidth=10,Color=Color.Black }); 
 
 
Please let us know if you have any other queries.  
 
Thanks,    
Muneesh Kumar G.    
 


Loader.
Live Chat Icon For mobile
Up arrow icon