Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (150).NET Core  (25)Angular  (46)ASP.NET  (48)ASP.NET Core  (61)ASP.NET MVC  (84)Azure  (28)Blazor  (84)DocIO  (19)Essential JS 2  (68)Essential Studio  (162)Flutter  (98)JavaScript  (146)Microsoft  (101)PDF  (57)React  (32)Succinctly series  (120)Syncfusion  (464)TypeScript  (30)Uno Platform  (2)UWP  (4)Vue  (26)Webinar  (21)Windows Forms  (54)WPF  (113)Xamarin  (124)XlsIO  (24)Other CategoriesBarcode  (4)BI  (29)Bold BI  (3)Build conference  (6)Business intelligence  (53)Button  (4)C#  (105)Chart  (48)Cloud  (9)Company  (445)Dashboard  (6)Data Science  (3)Data Validation  (3)DataGrid  (41)Development  (248)Doc  (7)DockingManager  (1)eBook  (91)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (19)Extensions  (12)File Manager  (4)Gantt  (8)Gauge  (6)Git  (4)Grid  (26)HTML  (9)Installer  (2)Knockout  (2)LINQPad  (1)Linux  (1)M-Commerce  (1)Metro Studio  (11)Mobile  (206)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (21)Performance  (5)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (5)Road Map  (9)Scheduler  (23)SfDataGrid  (8)Silverlight  (21)Sneak Peek  (16)Solution Services  (2)Spreadsheet  (7)SQL  (7)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (9)Tips and Tricks  (54)UI  (113)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (1)Visual Studio  (18)Visual Studio Code  (10)Web  (190)What's new  (120)Windows 8  (19)Windows App  (1)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
Everything You Need to Know About WinUI 3 Slider

Everything You Need to Know About WinUI 3 Slider

The WinUI 3 – Windows App SDK Slider control is a highly interactive UI control, allowing users to select a single value from a range of values. It provides rich features:

Let’s check out these features and learn how to integrate the WinUI 3 Slider control into your application!

Numeric scale

This feature provides the functionality for selecting numeric values in any range. You can also show the range with custom or logarithmic intervals.

Numeric scale in WinUI 3 Slider
Numeric scale in WinUI 3 Slider

Labels

Labels allow you to add numeric content to the WinUI Slider to depict the values in the scale. You can easily customize the label styles and value formats. Render them for specific intervals and add prefixes and suffixes. You can also visualize values as text, like Low, Medium, High.

Additionally, you can customize and differentiate the labels for active and inactive parts.

Label Customization in WinUI 3 Slider
Label Customization in WinUI 3 Slider

Ticks

This feature allows you to set two types of ticks in the WinUI 3 Slider axis:

  • Major ticks: Use this to show the intervals clearly.
  • Minor ticks: Help users choose values between two intervals easily.

You can also customize the positions of tick marks.

Major and Minor Ticks in WinUI 3 Slider
Major and Minor Ticks in WinUI 3 Slider

Thumb

This feature allows you to easily select a numeric value by dragging (interacting with) the thumb. Customize the thumb shapes with built-in shapes such as circles, diamonds, ovals, rectangles, or a custom thumb. Add text or an icon inside the thumb using a data template.

You can also customize the thumb size, fill, stroke, pressed color, and hover fill color based on your requirements using the built-in APIs.

Custom Thumbs in WinUI 3 Slider
Custom Thumbs in WinUI 3 Slider

Dividers

This feature allows you to render dividers in each interval to show the values intuitively. You can also easily customize the size, shape, and position of the dividers.

Additionally, you can customize and differentiate the dividers for active and inactive sections.

Dividers in WinUI 3 Slider
Dividers in WinUI 3 Slider

Vertical orientation

This feature allows you to display the Slider vertically. You can enjoy all the available features of the horizontal Slider in the vertical orientation, too.

Vertical Orientation in WinUI 3 Slider
Vertical Orientation in WinUI 3 Slider

Tooltip

This feature allows you to clearly indicate the current selection during the interaction. You can customize the format, styles, whole text, and visibility using the built-in APIs. You can also customize the position of the tooltip as above or below the track.

Tooltips in WinUI 3 Slider
Tooltips in WinUI 3 Slider

Discrete selection

This feature allows you to select only discrete numeric values. The values are selected continuously by default. However, in some cases, you can limit the value selection to specific values as shown in the following GIF image.

Discrete Selection in WinUI 3 Slider
Discrete Selection in WinUI 3 Slider

Right-to-left (RTL)

You can use this feature to arrange the axis scale values and move the thumb from the right-to-left direction. This is useful for users who work in RTL languages such as Hebrew, Arabic, and others.

Rendering WinUI 3 Slider in Right-to-Left Direction
Rendering WinUI 3 Slider in Right-to-Left Direction

Add the WinUI 3 Slider control to your application

We have seen the marvelous features of the WinUI 3 Slider control. Let’s learn how to create a simple WinUI 3 application with the Slider control to demonstrate its basic usage.

Step 1: Create a WinUI 3 application

First, create a simple project using the instructions provided in getting started with WinUI 3 apps and follow the Build apps with the Windows App SDK documentation.

Step 2: Install the necessary NuGet package

Then, install the latest Syncfusion.Sliders.WinUI NuGet package to the application from NuGet or from the installed location, C:\Program Files (x86)\Syncfusion\Essential Studio\WinUI\xx.x.x.xx\NuGetPackages.

Note: xx.x.x.xx denotes the version of the Syncfusion WinUI 3 – Windows App SDK Slider package.

Step 3: Add the namespace and initialize the Slider

Import the control’s namespace Syncfusion.UI.Xaml.Sliders in the XAML file and initialize the Slider control as shown in the following code example.

xmlns:slider="using:Syncfusion.UI.Xaml.Sliders"
...
<slider:SfSlider />

Step 4: Set value to the Slider

You can set the value in the Slider using the Value property. Specify the range of scale using the Minimum and Maximum properties. The default value of the Minimum and Maximum properties is 0 and 100, respectively. So, the Value property should be given within the default range.

<slider:SfSlider Value="50" />
Assigning Values to the WinUI 3 Slider
Assigning Values to the WinUI 3 Slider

Step 5: Enable ticks and labels

You can enable ticks in the Slider using the ShowTicks property and labels using the ShowLabels property. Refer to the following code example.

<slider:SfSlider Value="50" ShowLabels="True" ShowTicks="True" />
Enabling Ticks in WinUI 3 Slider
Enabling Ticks in WinUI 3 Slider

GitHub reference

For more information, refer to our WinUI Slider Getting Started demo project.

Conclusion

Thanks for reading! I hope you enjoyed learning about the Syncfusion WinUI 3 – Windows SDK App Slider control and its features. For more details, refer to our WinUI 3 Slider user guide and GitHub demos. Additionally, you can download and check out our demo app in the App Center.

If you aren’t a customer yet, you can try our 30-day free trial to check out these features.

If you need a specific feature in our WinUI Slider control, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Related blogs

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin
Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top