Skip to main content
All docs
V24.1

DxProgressBar.ProgressChanged Event

Fires after the progress value was changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<double> ProgressChanged { get; set; }

Parameters

Type Description
Double

Percentage progress.

Remarks

When the Value property is changed, the progress bar recalculates the percentage progress value. Handle the ProgressChanged event to respond to this progress change.

<DxButton Text="Run Progress" Click="RunProgress" />
<span> Current value: @value (@(currentProgress+"%"))</span>
<DxProgressBar MinValue="100" 
               MaxValue="300" 
               Value="value" 
               ProgressChanged="ProgressChanged" 
               ShowLabel="false" />
@code {
    Double currentProgress { get; set; }
    int value = 100;
    bool running;

    private void RunProgress() {
        if (running) return;
        running = true;
        InvokeAsync(async () => {
            while (running && value < 300) {
                await Task.Delay(25);
                value++;
                StateHasChanged();
            }
            running = false;
        });
    }
    private void ProgressChanged(Double progress) {
        currentProgress = Math.Round(progress);
    }
}

Custom progress bar label

See Also