ProgressBarStatus Enum
Lists values that specify progress bar status.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public enum ProgressBarStatus
Members
Name | Description | Image |
---|---|---|
InProgress
|
The default status. The progress bar displays the extending bar indicator and the percentage progress value. |
|
Success
|
The progress bar displays a fully colored bar indicator and the |
|
Pause
|
The progress bar displays a bar indicator at the current progress position and a |
|
Error
|
The progress bar displays a fully colored bar indicator and the |
Related API Members
The following properties accept/return ProgressBarStatus values:
Remarks
The progress bar status affects bar appearance, the icon, and the default label (when the Label property is not specified).
<DxProgressBar Value="value" ShowIcon="true" Status="status" />
@code {
ProgressBarStatus status;
int value = 0;
bool running;
private void RunProgress() {
if (running) return;
running = true;
InvokeAsync(async () => {
while (running && value < 100) {
await Task.Delay(25);
value++;
StateHasChanged();
// Set status to Pause for 1,5 seconds for demonstration purposes.
if (value == 30) {
await Task.Delay(500);
status = ProgressBarStatus.Pause;
StateHasChanged();
await Task.Delay(1500);
status = ProgressBarStatus.InProgress;
}
}
// Set status to Success when value reaches the maximum value (100%).
status = ProgressBarStatus.Success;
StateHasChanged();
running = false;
});
}
}