XAML:
<Grid x:Name="LayoutRoot" VerticalAlignment="Top">
<ScrollViewer x:Name="ScrollViewer1" Margin="0,0,0,0">
<StackPanel x:Name="myStackPanel"/>
</ScrollViewer>
</Grid>
C#:
Image[] image2 = new Image[30];
for (int n = 1; n <= 29; n++)
{
image2[n] = new Image();
BitmapImage bitmapa = downloadBitmap(n);
image2[n].Source = bitmapa;
myStackPanel.Children.Add(image2[n]);
}
I'm downloading BitmapImage from IsolatedSotrage -> downloadBitmap(n).
When I start the app I have a black image in my phone becouse photos are not visible(why?!), but when I lock the phone and unlock I have all the pictures, everything is ok.
When I remove ScrollViewer i don't have any problem.
Why this is happening? Please help me.