I don;t want to create new Class of the list items, without creating new class for listitems I want to bind it to ListBox control.
Using new class I am successful in binding the ListBox items but withour new Class I can't. Please help me.
My Xaml COde is:
C# Code is:
private void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
try
{
if (!string.IsNullOrEmpty(e.Result))
{
//string json = @"{ CPU: 'Intel', Drives: [ 'DVD read/writer', '500 gigabyte hard drive' ] }";
String s = Convert.ToString(e.Result);
//JArray a=
JArray obj = JsonConvert.DeserializeObject
//JObject obj = JsonConvert.DeserializeObject
Debug.WriteLine(obj.ToString());
for(int i=0;i
string jdata = obj[i].ToString();
//MessageBox.Show(jdata);
JObject obj2 = JObject.Parse(jdata);
string t = (string)obj2["title"];
string m = (string)obj2["magnitude"];
string loc = (string)obj2["location"];
string d = (string)obj2["depth"];
string lat = (string)obj2["latitude"];
string lon = (string)obj2["longitude"];
string dt = (string)obj2["date_time"];
string l = (string)obj2["link"];
//Here I want to bind all above data to the Listbox, there are total 30 details are there I want to show it in the Listbox one after another. How to do that ?
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
ProgressBarRequest.Visibility = System.Windows.Visibility.Collapsed;
}
}
Let me know How I can bind all above strings to the textblocks those are inside Listbox, so in a single page I can view all 30 details about the Data, which I fetched. Urgent help please.ho

Replies
Know the answer? Post it — somebody with the same question will find it here.