Because that's where you are resolving it in your XML query.
Because that's where you are resolving it in your XML query. Regardless, what you are looking for here is a sub-object that can be held in a list property of the Match object: listBox2. ItemsSource = from item in element.
Descendants("competition") from match in item. Elements("match") . Where(arg => arg.
Attribute("awayTeam"). Value == team || arg. Attribute("homeTeam").
Value == team) select new Match { HomeTeam = (string)match. Attribute("homeTeam"), AwayTeam = (string)match. Attribute("awayTeam"), HomeScore = (string)match.
Attribute("homeTeamScore"), AwayScore = (string)match. Attribute("awayTeamScore"), Goals = match. Elements("goals").
Select(ev => new MatchEvent { Player = (string)ev. Attribute("playerName"), Time = (string)ev. Attribute("time") }).ToList(), Dismissals = match.
Elements("dismissals"). Select(ev => new MatchEvent { Player = (string)ev. Attribute("playerName"), Time = (string)ev.
Attribute("time") }).ToList(), }; And the updated XAML.
– John Antony Daniel Nolan Aug 20 '11 at 20:47 Yes playerName should as I need the name of the person who scored, – John Antony Daniel Nolan Aug 20 '11 at 20:48 1 MatchEvent is a separate class that generalizes goal and dismissal. You cannot bind a list to a TextBox, you'll have to add a child ItemsControl into your ItemTemplate and bind its ItemsSource to the MatchEvents property. – Richard Szalay Aug 20 '11 at 20:49 1 After reviewing your question, I've split up Goals/Dismissals into separate objects/lists.
I've also added the updated XAML to better explain the nested ItemsControl. – Richard Szalay Aug 20 '11 at 20:56 1 @John - Thanks, I've fixed it in my answer too :) – Richard Szalay Aug 20 '117 at 8:38.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.