XDocument loadedData = XDocument.Load("book.xml");
var data = from query in loadedData.Descendants("paragraph")
select new CountryData
{
Title = (string)query.Element("title"),
Des = (string)query.Element("text").Value.ToString(),
Position = (int)query.Element("position"),
};
countryList = data.ToList();
How to display Des variable.i used textblock to display.
“TextBlock Text=”{Binding Des}” FontSize=”20″ TextWrapping=”Wrap” />”
how to use navigatatostring method to display html content.
The best approach I’ve found is to use an attached dependency property, you can see an example of this at my website Binding Html to the Web Browser Control. One gotcha that I didn’t note is that you can only call NavigateToString after the control is Loaded so you may need to structure your code so that the load of the Countries happens after this.