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

Define the fluent interface for configuring the ProgressBar component.

Definition

Constructors

Initializes a new instance of the ProgressBarBuilder class.

C#
public ProgressBarBuilder(ProgressBar component)
Parameters:componentProgressBar

The component.

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Animation(false)
)

Methods

Configures the animation effects.

C#
public ProgressBarBuilder Animation(Action<ProgressBarAnimationBuilder> animationAction)
Parameters:animationActionAction<ProgressBarAnimationBuilder>

The action which configures the animation effects.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Animation(a =&gt; a.Duration(200))
)

Use to enable or disable the animation.

C#
public ProgressBarBuilder Animation(bool enable)
Parameters:enablebool

The boolean value.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Animation(false)
)

If the options is added, the ProgressBar will have its "role" attribute set to "progressbar". It will also render its "aria-valuemin", "aria-valuemax", and "aria-valuenow" attributes.

C#
public ProgressBarBuilder AriaRole()
Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.AriaRole()
)

If set to "true", the ProgressBar will have its "role" attribute set to "progressbar". It will also render its "aria-valuemin", "aria-valuemax", and "aria-valuenow" attributes.

C#
public ProgressBarBuilder AriaRole(bool value)
Parameters:valuebool

The value for AriaRole

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.AriaRole(false)
)

Sets the number of chunks to which the ProgressBar will be divided (applies only when type is "chunk")

C#
public ProgressBarBuilder ChunkCount(int count)
Parameters:countint

The number of chunks

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Type(ProgressBarType.Chunk)
.ChunkCount(10)
)

Enables or disables the component

C#
public ProgressBarBuilder Enable(bool value)
Parameters:valuebool

true if the component should be enabled, false otherwise; the default is true.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Enable(false)
)

Configures the client-side events

C#
public ProgressBarBuilder Events(Action<ProgressBarEventBuilder> configurator)
Parameters:configuratorAction<ProgressBarEventBuilder>

The client events configuration action.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Events(events =&gt; events
.Change("onChange"))
)

The label that must be used as an "aria-label" for the ProgressBar element. It will be applied only if the AriaRole() option is enabled.

C#
public ProgressBarBuilder Label(string value)
Parameters:valuestring

The value of the label.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Label("value")
.AriaRole()
)

The ID of the element that will be used as a label of the ProgressBar. It will be used as a value of the "aria-labelledby" attribute and will be applied only if the AriaRole() option is enabled.

C#
public ProgressBarBuilder LabelId(string value)
Parameters:valuestring

The value for the LabelId option.

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.LabelId("value")
.AriaRole()
)

Sets the maximum value of the ProgressBar

C#
public ProgressBarBuilder Max(double value)
Parameters:valuedouble

Number specifying the maximum value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Max(200)
)

Sets the minimum value of the ProgressBar

C#
public ProgressBarBuilder Min(double value)
Parameters:valuedouble

Number specifying the minimum value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Min(50)
)

Sets the orientation of the ProgressBar

C#
public ProgressBarBuilder Orientation(ProgressBarOrientation orientation)
Parameters:orientationProgressBarOrientation

ProgressBarOrientation enumeration specifying the orientation

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Orientation(ProgressBarOrientation.Vertical)
)

Specifies if the ProgressBar direction will be reversed

C#
public ProgressBarBuilder Reverse(bool value)
Parameters:valuebool

The boolean value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Reverse(true)
)

Specifies if the Progress status will be displayed

C#
public ProgressBarBuilder ShowStatus(bool value)
Parameters:valuebool

The boolean value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.ShowStatus(false)
)

Specifies the type of the ProgressBar

C#
public ProgressBarBuilder Type(ProgressBarType type)
Parameters:typeProgressBarType

ProgressBarType enumeration specifying the type

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Type(ProgressBarType.Percent)
)

Sets the initial value of the ProgressBar

C#
public ProgressBarBuilder Value(bool value)
Parameters:valuebool

Pass false to set indeterminate value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Min(100)
.Max(200)
.Value(false)
)

Sets the initial value of the ProgressBar

C#
public ProgressBarBuilder Value(double value)
Parameters:valuedouble

Number specifying the value

Returns:

ProgressBarBuilder

Example:
C#
@( Html.Kendo().ProgressBar()
.Name("progressBar")
.Min(100)
.Max(200)
.Value(100)
)