Articles in this section
Category / Section

How to add shapes while loading the .NET MAUI Image Editor (SfImageEditor)?

2 mins read

Syncfusion .NET MAUI Image Editor (SfImageEditor) allows you to add shapes while loading. The following demonstration helps you to understand how to add shapes while loading using the ImageLoaded event.

XAML:
Initiate the Image Editor control and trigger the ImageLoaded event.

<imageEditor:SfImageEditor x:Name="imageEditor"  
                          Source="shape_onloading.png"
                          ImageLoaded="imageEditor_ImageLoaded">
</imageEditor:SfImageEditor>

C#:
Use the AddShape method in the ImageLoaded event to add shapes while loading. Find the following code sample for better understanding.

private void imageEditor_ImageLoaded(object sender, EventArgs e)
{
   imageEditor.AddShape(AnnotationShape.Rectangle,
   new ImageEditorShapeSettings()
   {
       Color = Colors.CadetBlue,
       StrokeThickness = 5,
       IsFilled = false
   });
}

Output:

Shape_OnLoading.png

Conclusion
I hope you enjoyed learning how to add shapes while loading the .NET MAUI Image Editor (SfImageEditor).

Refer to our .NET MAUI ImageEditor’s feature tour page for other groundbreaking feature representations. You can also explore our .NET MAUI ImageEditor documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our .NET MAUI Image Editor and other .NET MAUI components.

Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied