Skip to end of metadata
Go to start of metadata

UXScrollBar is a rich scroll bar control featuring Windows 7 style scrolling user interface. It allows you to view content that is outside of the current viewing area by sliding the UXThumb to make the content visible.

Using UXScrollBar

In most cases, you can use UXScrollViewer to host a generic content with built-in horizontal and vertical scrollbars. You use UXScrollBar to create custom scrollable content with specific scrolling behaviors, for instance, to implement a virtual scrolling as in UXVirtualizingListBox.

UXScrollBar supports both vertical and horizontal orientation which can be determined through the Orientation property.

As a range control, UXScrollBar provides the range-related properties which you can customize to suit your application, such as Minimum, Maximum and Value. The thumb size of the UXScrollBar is automatically calculated based on the specified ViewportSize property relative to the Minimum and Maximum properties.

You handle the Scroll event to implement your own custom logic whenever the UXScrollBar is scrolled, either through user interaction or programmatically. 

 

The following example shows a simple UXScrollBar definition in XAML.

XAML

Customizing UXScrollBar Appearance

You can easily customize the appearance of the UXScrollBar control through the following properties:

  • BackgroundBrush
  • BorderBrush
  • BorderThickness
  • CornerRadius  

 

Related Topics