Range Controls

Range controls do not render arbitrary content like content controls and items controls. Instead, a range control stores and displays a numeric value that falls within a specified range.

The core functionality of range controls comes from a RangeBase base class. This class defines properties of type double that store the current value and the endpoints of the range: Value, Minimum, and Maximum. It also defines a simple ValueChanged event.

This section examines the two major built-in range controls—ProgressBar and Slider. A ScrollBar control also derives from RangeBase, but you’re unlikely to want to use it directly. Instead, you would use a ScrollViewer, which internally manages its ScrollBars.

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.