Articles in this section
Category / Section

In SfImageEditor, how do you add text after the image has loaded?

1 min read

This section explains how to add text programmatically in Xamarin.Android Image Editor when imageeditor loaded in a view.

 Create SfImageEditor sample with all necessary assemblies.

 Please refer the below link to create a simple SfImageEditor sample along with the ways to configure it.

 

https://help.syncfusion.com/xamarin/sfimageeditor/getting-started

 

To add text  programmatically when imageeditor loaded in a view in two types such as

 

  1.Without Image

  2.With Image 

 

Without Image:

  To add text, you need to call AddText() method when loading image editor  in sample as like below code snippet

 

   Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
                {
                 editor.AddText("Text", new TextSettings());
 
                    return false;
                });

Screen Shot:

 

Chart, scatter chart

Description automatically generated

Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/IESample_(2)1258160418.zip

 

 

With Image:

  To add text when loading image editor with image, you need to call image loaded event as like below code snippet

 

editor.ImageLoaded += (Object sender, ImageLoadedEventArgs args) =>
              {
                  editor.AddText("Text", new TextSettings());
              };

 

Screen Shot:

 

A picture containing text, screenshot

Description automatically generated

 

 

 

Sample Link:

      https://www.syncfusion.com/downloads/support/directtrac/general/ze/IESample378534320.zip

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