menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class LinearGradientBrush

    Represents a linear gradient brush.

    Inheritance
    System.Object
    Brush
    LinearGradientBrush
    Namespace: Syncfusion.SfDiagram.XForms
    Assembly: Syncfusion.SfDiagram.XForms.dll
    Syntax
    public class LinearGradientBrush : Brush

    Constructors

    LinearGradientBrush()

    Initializes a new instance of the LinearGradientBrush class.

    Declaration
    public LinearGradientBrush()

    LinearGradientBrush(Single, Single, Single, Single, Color[])

    Initializes a new instance of the LinearGradientBrush class.

    Declaration
    public LinearGradientBrush(float startX, float startY, float endX, float endY, Color[] colors)
    Parameters
    Type Name Description
    System.Single startX

    X coordinate of the starting point.

    System.Single startY

    Y coordinate of the starting point.

    System.Single endX

    X coordinate of the ending point.

    System.Single endY

    Y coordinate of the ending point..

    Xamarin.Forms.Color[] colors

    Colors.

    LinearGradientBrush(Color[], Single[])

    Initializes a new instance of the LinearGradientBrush class.

    Declaration
    public LinearGradientBrush(Color[] colors, float[] positions)
    Parameters
    Type Name Description
    Xamarin.Forms.Color[] colors

    Colors.

    System.Single[] positions

    position for each color.

    Properties

    Colors

    Gets or sets the colors for gradient brush.

    Declaration
    public Color[] Colors { get; set; }
    Property Value
    Type
    Xamarin.Forms.Color[]

    EndX

    Gets or sets the X coordinates of the ending point.

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

    The end x.

    EndY

    Gets or sets the Y coordinates of the ending point.

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

    The end y.

    Positions

    Gets or sets the position for gradient brush color.

    Declaration
    public float[] Positions { get; set; }
    Property Value
    Type
    System.Single[]

    StartX

    Gets or sets the X coordinates of the starting point.

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

    The start x.

    StartY

    Gets or sets the Y coordinates of the starting point.

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

    The start y.

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