ProgressBarFor

ProgressBarFor represents a progress bar control that enables you to visually indicate the progress of a lengthy operation or operation rate, etc. A progress bar is typically used when an application performs tasks such as uploading files or deleting data records.

Implementation Details

ProgressBarFor is realized by the ProgressBarExtension class. Its instance can be accessed via the ExtensionsFactory<ModelType>.ProgressBarFor<ValueType> helper method, which is used to add a ProgressBarFor extension to a view. This first method's parameter is an expression that identifies model property to display. The second method's parameter provides access to the ProgressBarFor's settings implemented by the ProgressBarSettings class, allowing you to fully customize the extension.

The ProgressBarFor's client counterpart is represented by the ASPxClientProgressBar object.

Declaration

ProgressBarFor can be added to a view in the following manner.

View code (Razor):

@Html.DevExpress().ProgressBarFor(model => model.Progress,
    settings => {
        settings.Properties.Minimum = 0;
        settings.Properties.Maximum = 10;
        settings.Properties.ShowPosition = true;
        settings.Width = 150;
    }).GetHtml()

The code result is demonstrated in the image below.

progressbar-declaration.png

See Also