I have a horizontal stackpanel that includes many vertical stackpanels.
The above image shows the stackpanel have 20 items but shows only 12 items to us. The problem is how can we scroll it in horizontal dimension to show all elements?
I have a horizontal stackpanel that includes many vertical stackpanels.
The above image shows the stackpanel have 20 items but shows only 12 items to us. The problem is how can we scroll it in horizontal dimension to show all elements?
You can put your StackPanel
inside a ScrollViewer
like this:
<ScrollViewer
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled">
<StackPanel Orientation="Horizontal">
<Label>Item 1</Label>
<Label>Item 2</Label>
<Label>Item 3</Label>
<Label>Item 4</Label>
<Label>Item 5</Label>
<Label>Item 6</Label>
<Label>Item 7</Label>
<Label>Item 8</Label>
<Label>Item 9</Label>
<Label>Item 10</Label>
</StackPanel>
</ScrollViewer>
Output: