I am trying to use the Windows.UI.Xaml.Controls.ScrollBar but it won't display.
I've tried all kinds of stuff, but can't get it to display. Is there a trick to displaying a ScrollBar in a UWP page? What I'm trying to do is display the ScrollBar to the user so that they can use it to scroll up and down any content that I put in the Canvas. I am not happy with how the ScrollViewer works when a Canvas is placed inside of it and want to have full control of the Scrollbar without the overhead of a full ScrollViewer. I would like to avoid constructing my own ScrollBar using two buttons and a rectangle for the thumb inside of a rectangle for the scrollable region because at least I know those controls do display on a UWP page..
Thank You. I actually included the xaml with my original post using the Code Sample formatting button, but that feature isn't working...my xaml code was removed. So, here is the xaml code but without the angle brackets:
ScrollBar x:Name="thisScrollBar" Height="200" Width="20" Orientation="Vertical" Maximum="1000" Minimum="0" LargeChange="10" SmallChange="1" ViewportSize="10" IndicatorMode="MouseIndicator" Visibility="Visible" IsEnabled="True"
Part of the problem was that the IndicatorMode property defaults to None which prevents the ScrollBar from being visible even though the Visibility property is set to Visible. However, even with the IndicatorMode set to "MouseIndicator" the ScrollBar only displays a sliver of the Thumb until the user hovers over it with their mouse and soon after moving the mouse away it returns to just a sliver of the Thumb. Is there a way to keep it displayed? Is there a programmatic way such as a method or property to cause it to display? Also, with the IndicatorMode set to MouseIndicator will the ScrollBar never display for Tablet or XBox users because the IndicatorMode isn't set to TouchIndicator? Because when I set it to TouchIndicator it doesn't display even when hovering or clicking on the ScrollBar with the mouse.
You have been very helpful and I hope you can help me further, but please focus on the problem of getting the ScrollBar to display and avoid expanding the scope to events or other controls.