Xamarin.Forms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfBorder

    Show / Hide Table of Contents

    Class SfBorder

    Represents the SfBorder class. It is a container control that allows you apply borders, background, border width, and corner radius.

    Inheritance
    System.Object
    SfBorder
    SfAvatarView
    SfButton
    SfCardView
    Namespace: Syncfusion.XForms.Border
    Assembly: Syncfusion.Core.XForms.dll
    Syntax
    public class SfBorder : ContentView, IParentThemeElement, IThemeElement

    Constructors

    SfBorder()

    Initializes a new instance of the SfBorder class.

    Declaration
    public SfBorder()

    Fields

    BackgroundColorProperty

    Identifies the BackgroundColor bindable property.This property can be used to change the background color of border.

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

    This bindable property is read-only.

    BorderColorProperty

    Identifies the BorderColor bindable property.This property can be used to change the color of border.

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

    This bindable property is read-only.

    BorderThicknessProperty

    Gets or sets the value that indicates the border thickness. This is bindable property.

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

    If the values set to both BorderWidth and BorderThickness then BorderThickness takes highest precedence.

    BorderWidthProperty

    Identifies the BorderThickness bindable property.This property can be used to change the thickness of Border.

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

    If the values set to both BorderWidth and BorderThickness then BorderThickness takes highest precedence.

    CornerRadiusProperty

    Identifies the CornerRadius bindable property. This CornerRadius property is used when drawing rounded corners.

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

    This bindable property is read-only.

    DashArrayProperty

    Identifies the DashArray bindable property.This property can be used to change the type of Border.

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

    This bindable property is read-only.

    HasShadowProperty

    It is used to indicating whether to display the shadow for border (Applicable for Android and iOS).

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

    This bindable property is read-only.

    ShadowColorProperty

    It is used to change the color of border shadow (Applicable for Android and iOS).

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

    This bindable property is read-only.

    Properties

    BackgroundColor

    Gets or sets the value of BackgroundColor of border container.This property can be used to change the background color of border

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

    The background color of border.

    BorderColor

    Gets or sets the value of BorderColor in border container.This property can be used to change the color of border.

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

    The border color.

    BorderThickness

    Gets or sets the value that indicates the border thickness.

    Declaration
    public Thickness BorderThickness { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.Thickness
    Remarks

    If the values set to both BorderWidth and BorderThickness then the BorderThickness takes highest precedence.

    BorderWidth

    Gets or sets the value of BorderWidth in border container.This property can be used to customize the width of border.

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

    The border thickness.

    CornerRadius

    Gets or sets the value of corner radius.This property can be used to customize the corners of SfBorder control.

    Declaration
    public Thickness CornerRadius { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.Thickness

    The corner radius.

    DashArray

    Gets or sets the value of dash of the border.This property can be used to customize the dash of border.

    Declaration
    public double[] DashArray { get; set; }
    Property Value
    Type Description
    System.Double[]

    The dash array of the border.

    HasShadow

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

    ShadowColor

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

    Methods

    LayoutChildren(Double, Double, Double, Double)

    Layout the children based on border width

    Declaration
    protected override void LayoutChildren(double x, double y, double width, double height)
    Parameters
    Type Name Description
    System.Double x

    x value of border

    System.Double y

    y value of border

    System.Double width

    width of border

    System.Double height

    height of border

    OnMeasure(Double, Double)

    On the measure.

    Declaration
    protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    Width constraint.

    System.Double heightConstraint

    Height constraint.

    Returns
    Type Description
    Xamarin.Forms.SizeRequest

    The measure.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved