私の意図は簡単です。ユーザーがその特定のパネル内の多数のコントロールをスクロールできるソートパネルを作成します。そのパネル内のコントロールは、ボタン、画像、ラベルなどでも構いません。WP7 ScrollViewerは単に動作しません
Thing is ...私がScrollViewer Verticalを作成すると、スクロールされますが、スクロールバーがスクロールされますが、スクロールしたポイントには残りません。そして私がそれを水平にすると、それは私がそれが欲しい方法ですが、全くスクロールしません。
以下は私のコードです:よろしくお願いします!
<ScrollViewer Height="118" Name="scrollerButtons" Width="362" Canvas.Left="167" Canvas.Top="275" VerticalAlignment="Center">
<StackPanel Height="97" Name="stackPanelButtons" Width="168" Orientation="Horizontal" Canvas.Left="162" Canvas.Top="43" VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Width="60" Height="60"> </Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
<Button Width="60" Height="60"></Button>
</StackPanel>
</ScrollViewer>
私はすべてをテストするためにたくさんのボタンを追加しました。どんな助力も高く評価されます。ありがとうございました。
こんにちはジョーンズ。私はまさにそれをしました。まだ動作しません。 – Subby
私はそれを修正しました!私はこれを追加:ScrollViewer.HorizontalScrollBarVisibility = "Auto" ScrollViewer.VerticalScrollBarVisibility = "Visible" – Subby