# .NET MAUI CircularSlider Events

The Telerik UI for .NET MAUI CircularSlider component exposes a `ValueChanging` event which is raised when the end user drags the thumb or touches the range track. You can use this event to plug custom logic by changing the `Value` property.

The `ValueChanging` event handler receives two parameters:

* The sender argument, which is of type `object`, but can be cast to the `RadCircularSlider` type.
* A `Telerik.Maui.ValueChangingEventArgs` object, which provides the `Value` property of the CircularSlider.

The following example demonstrates how to use the `ValueChanging` event to prevent dragging the thumb to a smaller value:

1. Define the CircularSlider:

```XAML
<telerik:RadCircularSlider Grid.Row="0"
                           Minimum="0"
                           Maximum="100"
                           Value="35"
                           ValueChanging="OnValueChanging"
                           HorizontalOptions="Fill"
                           MinimumHeightRequest="300" />
```

2. Add the event handler:

```C#
private void OnValueChanging(object sender, ValueChangingEventArgs e)
{
    // Snap the value to the nearest multiple of 5 while dragging.
    e.Value = System.Math.Round(e.Value / 5) * 5;

    this.valueLabel.Text = $"Value: {e.Value:N0}";
}
```

3. Add the `telerik` namespace:

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

This is the result:

![Telerik UI for .NET MAUI CircularSlider ValueChanging event example with a blue range track and draggable thumb](https://www.telerik.com/maui-ui/documentation/assets/25223b4d5ac5baf6eab6142640490226/circularslider-value-changing.gif)

> For a runnable example demonstrating the CircularSlider value changing event, see the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and go to the **CircularSlider > Events** category.

## See Also

* [Value Thumb](https://www.telerik.com/maui-ui/documentation/controls/circularslider/value-thumb)
* [Range Track](https://www.telerik.com/maui-ui/documentation/controls/circularslider/range-track)
