Search results

Events in Blazor ProgressBar component

14 Apr 2021 / 2 minutes to read

In this section, will illustrate the list of events in Progress Bar component, which will be triggered for appropriate Progress Bar actions.

The events should be provided in the ProgressBarEvents.

ValueChanged

ValueChanged event triggers, when the progress Value is changed.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents ValueChanged="@ValueHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void ValueHandler(ProgressValueEventArgs args)
    {
        // Here can customize the code
    }
}

ProgressCompleted

ProgressCompleted event triggers, when the progress attains the Maximum value property.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents ProgressCompleted="@ProgressHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void ProgressHandler(ProgressValueEventArgs args)
    {
        // Here can customize the code
    }
}

AnimationComplete

AnimationComplete event triggers when animation of the progress Value get completed.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents AnimationComplete="@AnimationHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void AnimationHandler(ProgressValueEventArgs args)
    {
        // Here can customize the code
    }
}

AnnotationRender

AnnotationRender event triggers, before the Progress Bar annotaion rendered.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents AnnotationRender="@AnnotationHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void AnnotationHandler(AnnotationRenderEventArgs args)
    {
        // Here can customize the code
    }
}

TextRender

TextRender event triggers, before the Progress Bar text rendered.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents TextRender="@TextRenderHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void TextRenderHandler(TextRenderEventArgs args)
    {
        // Here can customize the code
    }
}

Loaded

Loaded event triggers, after the Progress Bar component rendered.

Copied to clipboard
<SfProgressBar Type="ProgressType.Linear" Value="100" Height="60" Minimum="0" Maximum="100">
    <ProgressBarEvents Loaded="@LoadedHandler"></ProgressBarEvents>
</SfProgressBar>

@code{
    public void LoadedHandler(System.EventArgs args)
    {
        // Here you can customize your code
    }
}