Can I change the color of the crop frame ?

Hello,

Is there a practical way for me to change the color of the selection frame while cropping the image?

Many thanks,

Ali


1 Reply

VM Vidyalakshmi Mani Syncfusion Team October 21, 2024 02:36 PM UTC

Hi Ali,


Thank you for reaching out! To change the color of the selection frame while cropping in the SfImageEditor control, you can utilize the `SelectionStroke` property. This property allows you to set the color for the selection view on cropping, shape and text annotations. By changing this property, you can ensure that the guides are visible even in images with a white background. Here's a code snippet that demonstrates how to set the `SelectionStroke` property:


XAML

 

<imageEditor:SfImageEditor x:Name="imageEditor"

                                                  Source="image.png"

                                                  SelectionStroke="Blue">

</imageEditor:SfImageEditor>

 


C#

 

 this.imageEditor.SelectionStroke = Colors.Blue;

 


For more details, please refer to our documentationWe hope that this helps you. If you have any further questions or need assistance, please feel free to ask.


Regards,
Vidyalakshmi M.



Loader.
Up arrow icon