Customize the color of the scrollbar thumb in UWP PDF Viewer

8 Jun 20211 minute to read

The PDF viewer uses the [ScrollViewer] ( control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code.

<sf:SfPdfViewerControl x:Name = “pdfViewer”>
        <SolidColorBrush x:Key="ScrollBarThumbFill" Color="Gold"/>
        <SolidColorBrush x:Key="ScrollBarThumbFillPointerOver" Color="Orange"/>
        <SolidColorBrush x:Key="ScrollBarThumbFillPressed" Color="Red"/>
        <SolidColorBrush x:Key="ScrollBarThumbFillDisabled" Color="Pink"/>