Xamarin.Forms

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

    Show / Hide Table of Contents

    Class CustomViewSettings

    Represents CustomViewSettings class.

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

    Constructors

    CustomViewSettings()

    Declaration
    public CustomViewSettings()

    Fields

    AngleProperty

    Gets or sets the Angle value for custom view. It is a bindable property.

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

    BoundsProperty

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

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

    CanMaintainAspectRatioProperty

    Gets or sets the value to maintain the aspect ratio of the custom view. It is a bindable property.

    Declaration
    public static readonly BindableProperty CanMaintainAspectRatioProperty
    Field Value
    Type Description
    Xamarin.Forms.BindableProperty

    EnableDragProperty

    Gets or sets the Enable Drag for Custom view.It is a bindable property.

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

    IsResizableProperty

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

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

    ShapeIDProperty

    Identifies the ShapeID bindable property.

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

    Properties

    Angle

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

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

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

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        CustomViewSettings settings = new CustomViewSettings(){ EnableRotation = true,Angle=50 };
        imageEditor.AddCustomView(view, settings);
    }

    Bounds

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

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

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

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        CustomViewSettings settings = new CustomViewSettings(){Bounds= new Rectangle(10, 80, 40, 10) };
        imageEditor.AddCustomView(view, settings);
    }

    CanMaintainAspectRatio

    Gets or sets the value to maintain the aspect ratio of the custom view. It is a bindable property.

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

    This sample shows how to set the IsNeedToMaintainAspectRatio for the custom view.

    void MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        CustomViewSettings settings = new CustomViewSettings(){ IsNeedToMaintainAspectRatio = true };
        imageEditor.AddCustomView(view, settings);
    }

    EnableDrag

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

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

    IsResizable

    Gets or sets the CustomView Resizable for the CustomViewSettings. It is a bindable property.

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

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

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.AddCustomView(customImage, new CustomViewSettings() { IsResizable=true });
    }

    ShapeID

    Gets the unique ID of the custom view.

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

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

    private void Editor_ItemSelected(object sender, ItemSelectedEventArgs args)
    {
        CustomViewSettings customViewSettings = args.Settings as CustomViewSettings;
        if (customViewSettings != null)
        {
            var shapeID = customViewSettings.ShapeID;
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved