I'm trying to use the WPF ScrollViewer with a stackpanel containing buttons, and without the scrollbar.
<ScrollViewer Grid.Row="1" Name="scrollViewer1" VerticalScrollBarVisibility="Hidden">
<StackPanel Name="stackPanel1">
<Button Content="Button1" Height="23" Name="button1" MinHeight="75" />
<Button Content="Button2" Height="23" Name="button2" MinHeight="75" />
<Button Content="Button3" Height="23" Name="button3" MinHeight="75" />
<Button Content="Button4" Height="23" Name="button4" MinHeight="75" />
<Button Content="Button5" Height="23" Name="button5" MinHeight="75" />
</StackPanel>
</ScrollViewer>
I want to use a "scroll up" and "scroll down" button elsewhere on the window (this is likely to be used on a small in vehicle screen). Easy enough to do using the scrollViewer1.LineDown() etc, but I would like to only show the "scroll up/scroll down" button if there are elements clipped or outside the viewport.
I'm not sure how to start here - do I need to test each element?
Any pointers most welcome!
Regards, Jason