in a stackpanel i add some labels from code behind at runtime: i want make the stackpanel scrollable. In the xaml file i have:
<ScrollViewer HorizontalAlignment="Left" Height="299" Margin="592,120,0,0" VerticalAlignment="Top" Width="188" VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="stackPanelVistaProfiloTessera" Height="292" Width="170"/>
</ScrollViewer>
In the code behind i add some label to the stackpanel:
for(.....)
{
stackPanelVistaProfiloTessera.Children.Add(new Label {....});
}
Why the stackpanel isn't scrollable? How can i resolve this?
Thanks