How to bind images from list of images in data template?

261 Views Asked by At

I've created a template selector and I'm using ffimage for caching the images. The model which is bind to the listView has a list of image urls which I need to bind to the image source. I'm binding the images as

postImage.SetBinding(CachedImage.SourceProperty, new Binding("image_url[0].media_url"));

Sometimes this works and sometimes the error comes as TargetInvocationException and I'm not able to find out, where this exception is coming but when I delete the bindings then the error goes away.

0

There are 0 best solutions below