How to rotate the text programmatically in the .NET MAUI Image Editor (SfImageEditor)?
The Syncfusion® .NET MAUI Image Editor (SfImageEditor) allows you to rotate the text programmatically. The following demonstration helps you to understand how to rotate the text programmatically using RotationAngle property.
XAML:
Initiate the Image Editor Control and provide the source image.
<imageEditor:SfImageEditor x:Name="imageEditor" Source="image.png"/>
C#:
In the ButtonClicked event, use the RotationAngle property of the ImageEditorTextSettings to rotate the text. The following code sample helps you to understand the implementation.
private void Button_Clicked(object sender, EventArgs e)
{
this.imageEditor.AddText("Good Day",
new ImageEditorTextSettings()
{
RotationAngle = 330,
TextStyle = new ImageEditorTextStyle()
{
FontSize = 25,
TextColor = Colors.Black,
FontFamily = "Arial",
FontAttributes = FontAttributes.Italic
},
});
}
Output:
Conclusion:
I hope you enjoyed learning how to rotate the text programmatically in the .NET MAUI Image Editor (SfImageEditor).
Refer to our .NET MAUI Image Editor feature tour page for other groundbreaking feature representations. You can also explore our .NET MAUI Image Editor 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 clarification. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!