And I add code
List
myl.Add(new Person { img = "Images/s1.jpeg" });
myl.Add(new Person { img = "Images/s2.jpeg" });
listBox.ItemsSource = myl;
The image not binded.There is no error while running.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
tanvir anikPosted Aug 19, 2010, 8:14 AM
You can check this out:
AND in the .cs file do code :
List
mylist.Add(new txtimg { imgpath = "images/s1.jpg", text = "pari ki" });
mylist.Add(new txtimg { imgpath = "images/s1.jpg", text = "diuol2" });
CB_projectlist.ItemsSource = mylist;
WHERE the txtimg class is :
public class txtimg
{
public string imgpath { get; set; }
public string text { get; set; }
}
Hope this helps a little.