New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the DiagramShapeFillGradientSettingsStop settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

C#
public class DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel> where TShapeModel : class where TConnectionModel : class

Inheritance: objectDiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public DiagramShapeFillGradientSettingsStopBuilder(DiagramShapeFillGradientSettingsStop settings)
Parameters:settingsDiagramShapeFillGradientSettingsStop

Methods

Defines the color. The option accepts a valid CSS color string, including HEX and Rgb.

C#
public DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel> Color(string value)
Parameters:valuestring

The value that configures the color.

Returns:

DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape =&gt; shape
.Add().Fill(f =&gt; f.Gradient(g =&gt; g.Stops(s =&gt;
{
s.Add().Color("rgb(124,252,0)");
s.Add().Color("#ff0000");
})))
)
)

Defines the stop offset from the start of the element. The range is from 0 (start of gradient) to 1 (end of gradient).

C#
public DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel> Offset(double value)
Parameters:valuedouble

The value that configures the offset.

Returns:

DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape =&gt; shape
.Add().Fill(f =&gt; f.Gradient(g =&gt; g.Stops(s =&gt;
{
s.Add().Offset(0);
s.Add().Offset(0.5);
})))
)
)

Defines the fill opacity. The range is from 0 (completely transparent) to 1 (completely opaque).

C#
public DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel> Opacity(double value)
Parameters:valuedouble

The value that configures the opacity.

Returns:

DiagramShapeFillGradientSettingsStopBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Shapes(shape =&gt; shape
.Add().Fill(f =&gt; f.Gradient(g =&gt; g.Stops(s =&gt;
{
s.Add().Opacity(0.5);
s.Add().Opacity(0.8);
})))
)
)