New to Telerik UI for WPF? Download free 30-day trial

Set the FluentPalette ScrollBarsMode on a Single Control

Environment

Product UI for WPF

Description

How to change the ThemeHelper.ScrollBarsMode attached property for a specific ScrollViewer control, this customizing the scrollbars in the Fluent theme.

Solution

To do this, you can add an implicit style in the Resources of the corresponding ScrollViewer control. The Style can have a single Setter changing the ThemeHelper.ScrollBarsMode attached property.

 <ScrollViewer MaxHeight="150" Grid.Row="1"> 
    <ScrollViewer.Resources> 
        <Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollBarStyle}"> 
            <Setter Property="helpers:ThemeHelper.ScrollBarsMode" Value="Compact"/> 
        </Style> 
    </ScrollViewer.Resources> 
    <!-- other XAML here --> 
</ScrollViewer> 
In this article
Not finding the help you need? Improve this article