menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextSettings - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextSettings

    Represents TextSettings class.

    Inheritance
    System.Object
    TextSettings
    Namespace: Syncfusion.SfImageEditor.XForms
    Assembly: Syncfusion.SfImageEditor.XForms.dll
    Syntax
    public class TextSettings : BindableObject

    Constructors

    TextSettings()

    Declaration
    public TextSettings()

    Fields

    AngleProperty

    Gets or sets the Angle value for text rotation. It is a bindable property.

    Declaration
    public static readonly BindableProperty AngleProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    BoundsProperty

    Gets or sets the Bounds value for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty BoundsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    ColorProperty

    Gets or sets the Color value for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty ColorProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableDragProperty

    Gets or sets the Enable Drag value for the text.It is a bindable property.

    Declaration
    public static readonly BindableProperty EnableDragProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    FontFamilyProperty

    Gets or sets the FontFamilt calue for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty FontFamilyProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    FontSizeProperty

    Gets or sets the FontSize for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty FontSizeProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    IsEditableProperty

    Gets or sets the TextAlignment value for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty IsEditableProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    IsResizableProperty

    Gets or sets the resizable for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty IsResizableProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    OpacityProperty

    Gets or sets the Opacity value for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty OpacityProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    ShapeIDProperty

    Identifies the ShapeID bindable property.

    Declaration
    public static readonly BindableProperty ShapeIDProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    TextAlignmentProperty

    Gets or sets the TextAlignment value for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty TextAlignmentProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    TextEffectsProperty

    Gets or sets the TextEffects for text. It is a bindable property.

    Declaration
    public static readonly BindableProperty TextEffectsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    Angle

    Gets or sets Angle for the text. It is a bindable property.

    Declaration
    public float Angle { get; set; }
    Property Value
    Type
    System.Single
    Examples

    This sample shows how to set the Angle property for the text.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){Angle = 50};
    }

    Bounds

    Gets or sets the Bounds for the PenSettings. It is a bindable property.

    Declaration
    public Rectangle Bounds { get; set; }
    Property Value
    Type
    Xamarin.Forms.Rectangle
    Examples

    This sample shows how to set the Bounds for the annotations.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        var penSettings = new PenSettings(){Bounds= new Rectangle(10, 80, 40, 10) };
        imageEditor.PenSettings = penSettings;
    }

    Color

    Gets or sets color for the text. It is a bindable property.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type
    Xamarin.Forms.Color
    Examples

    This sample shows how to set the Color property for the text.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){Color = Color.Red};
    }

    EnableDrag

    Gets or sets a value indicating whether text can be dragged or not.

    Declaration
    public bool EnableDrag { get; set; }
    Property Value
    Type
    System.Boolean

    FontFamily

    Gets or sets font family for the text. It is a bindable property.

    Declaration
    public string FontFamily { get; set; }
    Property Value
    Type
    System.String
    Examples

    This sample shows how to set the FontFamily property for the text.

    void MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){FontFamily = UIFont.FromName("Arial",20f)};
    }

    FontSize

    Gets or sets font size for the text. It is a bindable property.

    Declaration
    public double FontSize { get; set; }
    Property Value
    Type
    System.Double
    Examples

    This sample shows how to set the FontSize property for the text.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){FontSize = 14};
    }

    IsEditable

    Gets or sets the IsEditable value for the TextSettings. It is a bindable property.

    Declaration
    public bool IsEditable { get; set; }
    Property Value
    Type
    System.Boolean
    Examples

    This sample shows how to set the IsEditable value.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){IsEditable=true};
    }

    IsResizable

    Gets or sets the TextResizable for the TextSettings. It is a bindable property.

    Declaration
    public bool IsResizable { get; set; }
    Property Value
    Type
    System.Boolean
    Examples

    This sample shows how to set the IsResizable for the Text.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.AddText("new text",new TextSettings() { IsResizable=true});
    }

    Opacity

    Gets or sets the Opacity for the TextSettings. It is a bindable property.

    Declaration
    public float Opacity { get; set; }
    Property Value
    Type
    System.Single
    Examples

    This sample shows how to set the Opacity for text.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings = new TextSettings(){Opacity=0.5f };
    }

    ShapeID

    Gets the unique ID of the text.

    Declaration
    public int ShapeID { get; }
    Property Value
    Type
    System.Int32
    Examples

    This code shows how to get the unique ID of the added text.

    private void Editor_ItemSelected(object sender, ItemSelectedEventArgs args)
    {
        TextSettings textSettings = args.Settings as TextSettings
        if (textSettings != null)
        {
            var shapeID = textSettings.ShapeID;
        }
    }

    TextAlignment

    Gets or sets the TextAlignment value for the TextSettings. It is a bindable property.

    Declaration
    public TextAlignment TextAlignment { get; set; }
    Property Value
    Type
    TextAlignment
    Examples

    This sample shows how to set the TextAlignment value.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.TextSettings= new TextSettings(){TextAlignment =TextAlignment.Right };
    }

    TextEffects

    Gets/sets TextEffects.

    Declaration
    public TextEffects TextEffects { get; set; }
    Property Value
    Type
    TextEffects
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved