How can I set the scrollbar width application wide from code behind? I found some Examples in this post (How to increase scrollbar width in WPF ScrollViewer?), but only in XAML and not dynamically.
The important thing for me is that I am able to change the scrollbar width when the programm is running. So whatever I do, it must be possible to update the value over and over again.
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Stylus.IsFlicksEnabled" Value="True" />
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Height" Value="40" />
<Setter Property="MinHeight" Value="40" />
</Trigger>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Width" Value="40" />
<Setter Property="MinWidth" Value="40" />
</Trigger>
</Style.Triggers>
or
<Application
xmlns:sys="clr-namespace:System;assembly=mscorlib"
...
>
<Application.Resources>
<sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">50</sys:Double>
<sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarHeightKey}">50</sys:Double>
</Application.Resources>