How to get the added text from the text toolbar in Xamarin.Forms SfImageEditor?
This article explains how to get the added text with Text toolbar item usage in Syncfusion Xamarin Forms ImageEditor control, as shown below.
You can get the added text by selecting the text using the ItemSelected event as shown in the following code sample.
[XAML]
<imageEditor:SfImageEditor Source="{Binding Image}" ItemSelected="SfImageEditor_ItemSelected" > <imageEditor:SfImageEditor.BindingContext> <local:ImageModel/> </imageEditor:SfImageEditor.BindingContext> </imageEditor:SfImageEditor>
ImageModel is a view model class contains ImageSource type property called image to hold the source image.
[C#]
public partial class MainPage : ContentPage { … private void SfImageEditor_ItemSelected(object sender, Syncfusion.SfImageEditor.XForms.ItemSelectedEventArgs args) { if (args.Settings is TextSettings) { //get the selected text System.Diagnostics.Debug.WriteLine(args.SelectedItemName); } } }
See also
Toolbar Customization in Xamarin Image Editor (SfImageEditor)
Custom View in Xamarin Image Editor (SfImageEditor)
Image Filter in Xamarin Image Editor (SfImageEditor)
Customize text with TextSettings in Xamarin Image Editor (SfImageEditor)
Image cropping in Xamarin Image Editor (SfImageEditor)
Conclusion
I hope you enjoyed learning how to get the added text from the text toolbar in Xamarin.Forms SfImageEditor.
You can refer to our Xamarin .Forms Image Editor feature tour page to know about its other groundbreaking feature representations documentation and how to quickly get started for configuration specifications.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!