views:

20

answers:

0

I'm pretty sure my problem is going to be due to lack of knowledge with threads etc. but anyways:

I have a reference to a Grid object, which I'm filling with images via a list<list<image>> (columns<rows>).

_gridToFill.Dispatcher.Invoke(new Action(delegate()
{
   foreach (Image i in s)
   {
       _gridToFill.Children.Add(i);
   }
}

I get an error on this code as the image i is on a different thread, but if I put in a second invoke the app hangs and I get no errors or anything. Am I going about this all wrong?

Thanks, Becky