I'm stuck with a problem I can't seem to get around...
I need to set the contents of a ScrollViewer to that of another (which contains a StackPanel, which contains images and text).
I have tried the following approaches and I keep getting an error ("The parameter is incorrect").
scrollViewer[1].Content = scrollViewer[2].Content;
and
scrollViewer[1].Content = stackPanel[2]; // stackPanel[2] is currently what the content of scrollViewer[2] is set to
I have also tried removing scrollViewer[1] as a child of the ContentPanel and creating a new instance of it, then adding it.
I have also tried setting scrollViewer[1].Content to null before setting it to anything else.
Does anyone know a way around this? What am I missing? Any clues would be appreciated!