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

Disable the Horizontal Scrollbar of RadPropertyGrid

Environment

Product Version 2022.2 621
Product RadPropertyGrid for WPF

Description

Setting the ScrollViewer.HorizontalScrollBarVisibility directly onto the RadPropertyGrid control instance does not hide the horizontal scrollbar.

Solution

  1. Create a new Style with TargetType="ScrollViewer" in the Resources collection of the RadPropertyGrid element instance.

  2. Set the HorizontalScrollBarVisibility property to Disabled via a Setter.

Disable horizontal scrollbar

<telerik:RadPropertyGrid> 
    <telerik:RadPropertyGrid.Resources> 
        <Style TargetType="ScrollViewer"> 
            <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/> 
        </Style> 
    </telerik:RadPropertyGrid.Resources> 
</telerik:RadPropertyGrid> 
In this article