Articles in this section
Category / Section

How to rotate the text programmatically in image editor?

3 mins read

This section explains how to  rotate the  text programmatically in imageeditor.

 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.


For example, rotate the text based on slider value changed means

Step 1: Add slider control along with image editor in your sample


Step 2: To rotate the selected text programmatically without using resizing handler, you need to call


item selected event to get the selected text angle from text settings as like below code snippet


In C#


            editor.ItemSelected += Editor_ItemSelected;
private void Editor_ItemSelected(object sender, ItemSelectedEventArgs args)
            if (args.Settings != null)
                settings = (args.Settings as TextSettings);
                BindingContext = settings;


In Xaml


                <RowDefinition Height="0.1*" ></RowDefinition>
                <RowDefinition Height="0.9*"></RowDefinition>
            <Slider x:Name="slider" MinimumTrackColor="Blue" BackgroundColor="Black"  Maximum="360"  Value="{Binding Angle,Mode=TwoWay}"  Grid.Row="0"></Slider>
            <imageeditor:SfImageEditor  Grid.Row="1" x:Name="editor">





Screen Shot:







Sample Link:


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