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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
tanvir anik8 reputationPosted Aug 19, 2010, 4:14 AM EDT
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.