WinPhone 7.1
In a ScrollViewer I have a stack panel with about 500 strings. I want to scroll the stack panel from code to a certain offset. I tried this:
for (int i = 0; i < 500; i++)
{
tb = new TextBlock();
tb.Text = "String #" + i.ToString();
this.stackPanel1.Children.Add(tb);
}
this.scrollViewer1.ScrollToVerticalOffset(200);// scroll to offset 200
this.scrollViewer1.UpdateLayout();
but it wont scroll at all.
What am I doing wrong?
Thanks
donescamillo