tags:

views:

36

answers:

1

I am fairy new to Silverlight and I have a problem.

I have a grid on a page that is resizable when the user resizes their browser window. In one of the grids columns I want to display dynamically added content that is scrollable, as there is more data than space available. I currently have a scrollViewer with a stack panel inside it, that i programmatically add a user control to and then several user controls to that control depending on the amount of content.

My problem is this. The scrollViewer does not respect the available space and as such displays its content outside of the viewable area when there is more data than space. i.e. it does not uses it is not scrollable nature.

Hopefully this is something simple that I have missed, but i am banging my head against the wall at the moment. Any help gratefully received.

A: 

With seeing the xaml, my guess is that the problem may be with the StackPanel. StackPanels don't display scrollbars when their content is too large. I would suggest adding your UserControl directly inside of your ScrollViewer. If your ScrollViewer needs to have multiple children, I would suggest using a different type of container such as a Grid or a ListBox.

Jacob Adams