menu

MAUI

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

    Show / Hide Table of Contents

    Class ImageEditorShapeSettings

    Represents a class that contains the settings for shape annotation view.

    Inheritance
    System.Object
    ImageEditorAnnotationSettings
    ImageEditorShapeSettings
    Inherited Members
    ImageEditorAnnotationSettings.AllowDrag
    ImageEditorAnnotationSettings.AllowDragProperty
    ImageEditorAnnotationSettings.AllowResize
    ImageEditorAnnotationSettings.AllowResizeProperty
    ImageEditorAnnotationSettings.Bounds
    ImageEditorAnnotationSettings.BoundsProperty
    ImageEditorAnnotationSettings.Id
    ImageEditorAnnotationSettings.IdProperty
    ImageEditorAnnotationSettings.IsRotatable
    ImageEditorAnnotationSettings.IsRotatableProperty
    ImageEditorAnnotationSettings.Opacity
    ImageEditorAnnotationSettings.OpacityProperty
    ImageEditorAnnotationSettings.RotationAngle
    ImageEditorAnnotationSettings.RotationAngleProperty
    Namespace: Syncfusion.Maui.ImageEditor
    Assembly: Syncfusion.Maui.ImageEditor.dll
    Syntax
    public class ImageEditorShapeSettings : ImageEditorAnnotationSettings

    Constructors

    ImageEditorShapeSettings()

    Declaration
    public ImageEditorShapeSettings()

    Fields

    ColorProperty

    Identifies the Color dependency property.

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

    The identifier for Color dependency property.

    IsFilledProperty

    Identifies the IsFilled dependency property.

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

    The identifier for IsFilled dependency property.

    PointsProperty

    Identifies the Points dependency property.

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

    The identifier for Points dependency property.

    StrokeThicknessProperty

    Identifies the StrokeThickness dependency property.

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

    The identifier for StrokeThickness dependency property.

    Properties

    Color

    Gets or sets the shape annotation color.

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

    The default value is Colors.Red.

    Examples

    The below examples shows, how to set a color to the annotation.

    • 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() { Color = Colors.Red });
    }

    IsFilled

    Gets or sets a value indicating whether the color should be applied to the shape fill or stroke.

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

    The default value is false.

    Remarks

    IsFilled is applicable only for Rectangle and Circle shape types.

    Examples

    The below examples shows, how to enable a fill to the annotation.

    • 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() { IsFilled = true });
    }

    Points

    Gets or sets the path points.

    Declaration
    public PointCollection Points { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.PointCollection
    Remarks

    Points is applicable only for Polygon and Polyline shape types.

    StrokeThickness

    Gets or sets the shape annotation stroke thickness.

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

    The default value is 3.

    Remarks

    Stroke Thickness is not applicable for Rectangle and Circle in filled state.

    Examples

    The below examples shows, how to set a stroke thickness to the annotation.

    • 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.Rectangle, new ImageEditorShapeSettings() { StrokeThickness = 4 });
    }
    See Also
    IsFilled
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved