Override default scrollbar behaviour in Windows 10 UWP

Viewed 167

I am using the Uno platform and trying to override the default UWP scrollbar and end up with something like this (a static, always visible scrollbar with increased width and different color):

UWP scrollbar screenshot

I've tried playing around with the ScrollBar's Style properties, but so far I haven't gotten anywhere:

<Style TargetType="ScrollBar">
<Setter Property="Visibility" Value="Visible"></Setter>
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Background" Value="Blue" />
<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="ScrollBar">

            <!-- not sure what properties I need to override -->

        </ControlTemplate>
    </Setter.Value>
</Setter>
<ScrollViewer Height="800" 
              Visibility="Visible">
    <ListView>
    <ListViewItem>Reboot</ListViewItem>
    <ListViewItem>Refresh Data</ListViewItem>
    <ListViewItem>Update Configs</ListViewItem>
        ...
    </ListView>
</ScrollViewer>

And the results from the above XAML:

blue thin scrollbar

purple thick scrollbar

0 Answers
Related