Class CustomViewSettings
Represents CustomViewSettings class.
Inheritance
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
Xamarin.Forms.BindableProperty |
ShapeIDProperty
Identifies the ShapeID bindable property.
Declaration
public static readonly BindableProperty ShapeIDProperty
Field Value
Type |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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;
}
}