How do I handle the value change event of a Slider in XAML?

Platform: .NET MAUI| Category: Controls

You can handle the value change event of a Slider in XAML like this:

XAML

<Slider ValueChanged="Slider_ValueChanged"></Slider>

C#

private void Slider_ValueChanged(object sender, ValueChangedEventArgs e)
{
        double newValue = e.NewValue;
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.