ボタンを含むスタックパネルでスクロールバーなしでWPF ScrollViewerを使用しようとしています。
<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>
ウィンドウの別の場所で「スクロールアップ」および「スクロールダウン」ボタンを使用したい (これは、車内の小さな画面で使用される可能性が高い)。scrollViewer1.LineDown() などを使用して簡単に実行できますが、要素がクリップされているかビューポートの外側にある場合にのみ、「スクロールアップ/スクロールダウン」ボタンを表示したいと思います。
ここから始める方法がわかりません。各要素をテストする必要がありますか?
どんなポインタでも大歓迎です!
よろしく、ジェイソン