Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramsGradientStop - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramsGradientStop

    Represents the color and a position, where the previous color transition ends, and a new color transition starts.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramsGradientStop
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramsGradientStop : SfDiagramBase
    Examples
      
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </SfDiagram>
    @code{
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
       protected override void OnInitialized()
       {
         DiagramNode Node = new DiagramNode()
         {
            // Position of the node
            OffsetX = 250,
            OffsetY = 250,
            // Size of the node
            Width = 100,
            Height = 100,
            Style = new NodeShapeStyle()
            {
            Gradient = new DiagramGradient()
            {
              //Center point of inner circle
              Fx = 20,
              Fy = 20,
              //Center point of outer circle
              Cx = 50,
              Cy = 50,
              //Radius of a radial gradient
              R = 50,
              //Sets an array of stop objects
              Stops = new ObservableCollection<DiagramsGradientStop>()
              {
                new DiagramsGradientStop(){ Color = "white", Offset = 0},
                new DiagramsGradientStop(){ Color = "#6BA5D7", Offset = 100}
              },
              Type = GradientType.Radial
            }
           },
         };
         // Add node
         NodeCollection.Add(Node);
        }
      }

    Constructors

    DiagramsGradientStop()

    Represents the color and a position, where the previous color transition ends, and a new color transition starts.

    Declaration
    public DiagramsGradientStop()

    Properties

    Color

    Gets or sets the color to be filled over the specified region.

    Declaration
    public string Color { get; set; }
    Property Value
    Type Description
    System.String

    Offset

    Gets or sets the position where the previous color transition ends, and a new color transition starts.

    Declaration
    public Nullable<double> Offset { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Opacity

    Gets or sets the transparency level of the region.

    Declaration
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.Double
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved