Articles in this section
Category / Section

How to create a .NET MAUI Vertical Slider?

3 mins read

Using Syncfusion® .NET MAUI Slider, you can create a vertical slider easily by following these steps:

 

Step 1: Create a .NET MAUI application project in Visual Studio.

 

Step 2: In the NuGet package manager, search for Syncfusion.Maui.Sliders and install it.

 

Step 3: In the MauiProgram.cs file, register the Syncfusion.Maui.Core handler as shown in the following code sample.

 

Using C#

using Syncfusion.Maui.Core.Hosting;
 
namespace SliderDemo
{
    public static class MauiProgram
    {
        public static MauiApp CreateMauiApp()
        {
            var builder = MauiApp.CreateBuilder();
            builder
                .UseMauiApp<App>()
                .ConfigureSyncfusionCore();
 
            return builder.Build();
        }
    }
}

 

Note:

The Syncfusion.Maui.Core package is dependent on Syncfusion.Maui.Sliders NuGet package, and it will be installed automatically when you install the Syncfusion.Maui.Sliders package.

 

Step 4: Add the .NET MAUI Sliders’ control namespace to the MainPage.xaml.

 

Using XAML

xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"

 

Using C#

using Syncfusion.Maui.Sliders;

 

Step 5: Initialize the SfSlider and set the SfSlider.Orientation property to Vertical.

 

Using XAML

<ContentPage.Content>
        <sliders:SfSlider Orientation="Vertical" />
</ContentPage.Content>

 

Using C#

// Initializing SfSlider.
SfSlider slider = new SfSlider(); 
slider.Orientation = SliderOrientation.Vertical;
this.Content = slider;

 

Output

Syncfusion Maui vertical slider


 

Conclusion

I hope you enjoyed learning how to create the .NET MAUI Vertical Slider.

Refer to our .NET MAUI Slider feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Slider documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Slider and other .NET MAUI components.

Please let us know in the following comments section if you have any queries or require clarifications. Contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied