0

I want to put lots of controls inside a StackPanel and user can scroll up and down. I have a simple StackPanel inside a grid.

<Grid>
    <StackPanel>

    </StackPanel>
</Grid>

If I'm not wrong, I've seen that StackPanel scrolls, but now it is not working. Does it support scrolling or it is not supported at all? ( I prefer not to put it inside a ScrollViewer). thanks

user3293835
  • 829
  • 2
  • 15
  • 30
  • http://stackoverflow.com/questions/802821/how-can-i-get-scrollviewer-to-work-inside-a-stackpanel – Heena Mar 08 '14 at 15:54

1 Answers1

1

Nothing really scrolls unless it has a ScrollViewer inside. When you do it like you're doing it now, you'll see only the items that fit on the screen, and others will be 'out of screen borders'.

So I'm afraid you'll have to add a ScrollViewer. It's actually a good thing that StackPanel doesn't scroll by default.

Igor Ralic
  • 14,975
  • 4
  • 43
  • 51
  • thanks igrali. my problem with `ScrollViewer` is that when I pull down it, it shrinks and app black background appears. this is not good when I have an image as the background – user3293835 Mar 08 '14 at 15:04