0

I'm trying to scroll items in stackpanel added programmatically, but it's not working:

<ScrollViewer HorizontalScrollMode="Enabled" >
    <StackPanel x:Name="options" Orientation="Horizontal" Width="760" HorizontalAlignment="Left" Margin="1,0,0,0">
    </StackPanel>
</ScrollViewer>

is there any error?

leppie
  • 115,091
  • 17
  • 196
  • 297
ahmad
  • 103
  • 2
  • 12

1 Answers1

0

You also need to specify the horizontal visibility of the ScrollViewer. Set it to any value other than Disabled (the default) and it will work:

<ScrollViewer HorizontalScrollMode="Enabled" HorizontalScrollBarVisibility="Auto">
Willem van Rumpt
  • 6,490
  • 2
  • 32
  • 44