lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.69k stars 751 forks source link

Unable to Resize Scroll Bars #1162

Open stepwise-alan opened 3 months ago

stepwise-alan commented 3 months ago

Describe the bug

First of all, thank you for creating such a fantastic library!

I am unable to adjust the size of the scroll bars. When I attempt to set the height of horizontal scroll bars and the width of vertical scroll bars, the scroll bars remain narrow, and there is unused space around them. I am not trying to modify the default behavior; I just want to be able to customize the width and height of the scroll bars.

To Reproduce

  1. Use the following XAML code in a WPF application:
    <ui:DataGrid Height="400" Width="400" ItemsSource="{Binding ViewModel.ProductsCollection, Mode=TwoWay}">
        <ui:DataGrid.Resources>
            <Style
                TargetType="ScrollBar"
                BasedOn="{StaticResource UiScrollBar}">
                <Style.Triggers>
                    <Trigger Property="Orientation" Value="Vertical">
                        <Setter Property="Width" Value="50" />
                    </Trigger>
                    <Trigger Property="Orientation" Value="Horizontal">
                        <Setter Property="Height" Value="50" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </ui:DataGrid.Resources>
    </ui:DataGrid>
  2. Run the application and observe the scroll bars in the DataGrid.

Expected behavior

The scroll bars should resize correctly to the specified dimensions, making them easier to use. Users cannot scroll the horizontal scroll bar with their mouse wheel, so it needs to be dragged, and the current narrow width makes this difficult.

Screenshots

image

OS version

.NET version

WPF-UI NuGet version

Additional context

The scroll bars look visually appealing but are difficult to interact with due to their narrow width (horizontal) and height (vertical). Allowing customization of their size should make them more user-friendly, especially the horizontal scroll bar, which needs to be dragged.

jschroedl commented 3 weeks ago

I would also appreciate a way to widen the scrollbars. I suspect I'll have to figure this one out myself.