Hello, everyone! I'm trying to override the defaults and set the MinHeight and Height of the Vertical ScrollBar inside my textboxes. I need to do this because my textboxes are small (not too small, though), and as a result the default scrollbars are
too large to fit inside the textbox. Here's my XAML code to override the default ScrollBar defaults:
<Page.Resources>
<Style TargetType="ScrollBar">
<Setter Property="Height" Value="40" />
<Setter Property="MinHeight" Value="1" />
</Style>
</Page.Resources>
I've searched online for help regarding this issue, but after hours of searching I still couldn't find anything that helped with this specific issue. I've also copied the default ScrollViewer template from
here and modified it, but I didn't have any luck.
I have my VerticalScrollBarVisibility set to True, so I can see the Vertical ScrollBar when I hover my mouse over a TextBox. The strange part is that my XAML styling works. However, if I enter enough text into the TextBox that would normally make the ScrollBar
appear when it is set to Auto, the ScrollBar will change and turn back into the default, which is too big.
I'm pretty lost here, so could someone help me out, please?
Additionally, I've noticed that you still cannot change the color of the caret in a textbox. If this is true, is there some sort of workaround for it? My textboxes are black, and the caret cannot stay black in this situation.
Thank you very much!