Ok, I am having more problems with my C# WPF ListView control. Here it is in all its glory:
var items = from item in xdoc.Descendants("Book")
select new Book() // <---
{
ISBN = (string)item.Element("ISBN"),
Title = (string)item.Element("Title"),
Author = (string)item.Element("Author"),
};
foreach (var item in items)
{
listView1.Items.Add(item);
}
I have got an issue with code above, once I use it, my listView did not list any of those values. I do not know if that will help you or if that is correct but after a few tests I added () after "select new Book" and then ListView could show all fields correctly for me.