menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ImageEditorAnnotationSettings - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ImageEditorAnnotationSettings

    Represents a class that contains common settings for annotation views.

    Inheritance
    System.Object
    ImageEditorAnnotationSettings
    ImageEditorShapeSettings
    ImageEditorTextSettings
    Namespace: Syncfusion.Maui.ImageEditor
    Assembly: Syncfusion.Maui.ImageEditor.dll
    Syntax
    public class ImageEditorAnnotationSettings : BindableObject

    Constructors

    ImageEditorAnnotationSettings()

    Declaration
    public ImageEditorAnnotationSettings()

    Fields

    AllowDragProperty

    Identifies the AllowDrag dependency property.

    Declaration
    public static readonly BindableProperty AllowDragProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for AllowDrag dependency property.

    AllowResizeProperty

    Identifies the AllowResize dependency property.

    Declaration
    public static readonly BindableProperty AllowResizeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for AllowResize dependency property.

    BoundsProperty

    Identifies the Bounds dependency property.

    Declaration
    public static readonly BindableProperty BoundsProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Bounds dependency property.

    IdProperty

    Identifies the Id dependency property.

    Declaration
    public static readonly BindableProperty IdProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Id dependency property.

    IsRotatableProperty

    Identifies the IsRotatable dependency property.

    Declaration
    public static readonly BindableProperty IsRotatableProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for IsRotatable dependency property.

    OpacityProperty

    Identifies the Opacity dependency property.

    Declaration
    public static readonly BindableProperty OpacityProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Opacity dependency property.

    RotationAngleProperty

    Identifies the RotationAngle dependency property.

    Declaration
    public static readonly BindableProperty RotationAngleProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for RotationAngle dependency property.

    Properties

    AllowDrag

    Gets or sets a value indicating whether to enable drag action for annotation.

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

    The default value is true

    Examples

    The below examples shows, how to enable or disable the drag action.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png
                               ImageLoaded="OnImageLoaded"
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddShape(AnnotationShape.Circle, new ImageEditorShapeSettings() { AllowDrag = false });
    }

    AllowResize

    Gets or sets a value indicating whether the resizing action is enabled or not for annotation.

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

    The default value is true

    Examples

    The below examples shows, how to enable or disable the resizing action.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png"
                               ImageLoaded="OnImageLoaded"
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddShape(AnnotationShape.Arrow, new ImageEditorShapeSettings() { AllowResize=false });
    }

    Bounds

    Gets or sets the annotation view bounds.

    Declaration
    public Rect Bounds { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Graphics.Rect

    The value ranges from 0 to 1.

    Examples

    The below examples shows, how to set a annotation view bounds.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png ImageLoaded="OnImageLoaded""
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddShape(AnnotationShape.Arrow, new ImageEditorShapeSettings() { Bounds=new Rect(0.1,0.1,0.5,0.5)});
    }

    Id

    Gets or sets a value that can be used to uniquely identify an annotation.

    Declaration
    public object Id { get; set; }
    Property Value
    Type
    System.Object

    IsRotatable

    Gets or sets a value indicating whether the annotation is rotatable or not.

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

    The default value is true..

    Remarks

    The IsRotatable property is not applicable for the shape annotations.

    Examples

    The below examples shows, how to set a rotation value.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png"
                               ImageLoaded="OnImageLoaded"
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddText("Good Day", new ImageEditorTextSettings() { IsRotatable = false });
    }

    Opacity

    Gets or sets the opacity value. It ranges from 0 to 1.

    Declaration
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 1.

    Examples

    The below examples shows, how to set a opacity value.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png"
                               ImageLoaded="OnImageLoaded"
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddShape(AnnotationShape.Arrow, new ImageEditorShapeSettings()  { Opacity= 0.5 });
    }

    RotationAngle

    Gets or sets the annotation rotation angle.

    Declaration
    public double RotationAngle { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0.

    Remarks

    The RotationAngle property is not applicable for the shape annotations.

    Examples

    The below examples shows, how to set a rotation value.

    • XAML
    • C#
    <imageEditor:SfImageEditor x:Name="imageEditor"
                               Source="syncfusion.png"
                               ImageLoaded="OnImageLoaded"
    </imageEditor:SfImageEditor>
    private void OnImageLoaded(object sender, EventArgs e)
    {
        this.imageEditor.AddText("Good Day", new ImageEditorTextSettings() { RotationAngle = 90 });
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved