# .NET MAUI ProgressBar Events

The ProgressBar for .NET MAUI exposes the following events:

* `ProgressChanged` event is raised when progress is changed. The `ProgressChanged` event handler receives two parameters:

  * A `ProgressChangedEventArgs` which has a `Progress`(`double`) property. Using this property you can get the current progress of the ProgressBar control.

* `ProgressCompleted` event is raised when the Value of the ProgressBar reaches the `Maximum` value.

Example with `ProgressChanged` and `ProgressCompleted` events

A simple `RadLinearProgressBar` definition:

```XAML
<VerticalStackLayout Margin="20"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand"
                     Spacing="20">
    <HorizontalStackLayout>
        <Label Text="{Binding Value, Source={x:Reference progressBar}}"
               VerticalTextAlignment="Center" />
        <Stepper Minimum="0"
                 Maximum="180"
                 Increment="20"
                 Value="{Binding Value, Source={x:Reference progressBar}}" />
    </HorizontalStackLayout>
    <HorizontalStackLayout>
        <Label Text="Events: " />
        <Label x:Name="statusLabel" />
    </HorizontalStackLayout>
    <telerik:RadLinearProgressBar x:Name="progressBar"
                                  Minimum="0"
                                  Maximum="180"
                                  Value="20"
                                  ProgressChanged="OnProgressChanged"
                                  ProgressCompleted="OnProgressCompleted" />
</VerticalStackLayout>
```

Add the following namespace:

```XAML
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
```

`ProgressChanged` event in code behind. The Label text is updated with the current `Progress` value:

```C#
private void OnProgressChanged(object sender, ProgressChangedEventArgs e)
{
    this.statusLabel.Text = e.Progress.ToString();
}
```

`ProgressCompleted` event in code behind. The Label text is updated with `Text = "Completed"` when the progress reaches the `Maximum` value:

```C#
private void OnProgressCompleted(object sender, EventArgs e)
{
    this.statusLabel.Text = "Completed";
}
```

The final result when using the `ProgressChanged` and `ProgressCompleted` events on Android:

![.NET MAUI ProgressBar events](https://www.telerik.com/maui-ui/documentation/assets/a25f0f392aae946846979549d9372009/progressbar-events-android.gif)

And on WinUI:

![.NET MAUI ProgressBar events](https://www.telerik.com/maui-ui/documentation/assets/45c6b1360961d59aeda9074c72ef4cdf/progressbar-progress-windows.gif)

> important For the ProgressBar Events example refer to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app).

## See Also

* [Configuration](https://www.telerik.com/maui-ui/documentation/controls/progressbar/configuration)
* [Indeterminate Mode](https://www.telerik.com/maui-ui/documentation/controls/progressbar/indeterminate-mode)
* [Styling](https://www.telerik.com/maui-ui/documentation/controls/progressbar/styling)
