Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxProgressBar.ProgressChanged Event

Fires after the progress value was changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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.

razor
<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);
    }
}

See Also