问题描述:

I have a rather simple problem (I bealive). I have this method:

 void appointments_SearchCompleted(object sender, AppointmentsSearchEventArgs e)

{

if (e.Results.Count() == 0)

{

results = "no events for the selected day";

//MessageBox.Show(results);

}

else

{

results = e.Results.Count() + " events found";

sourceItem = e.Results;

//MessageBox.Show(results);

}

}

And I can't "save" both results and sourceItem variables(which are class fields).

The Message box inside this method shows everything correct, howerver, on the outside results reverts to the default value.

网友答案:

The answer is simple: I didn't get how ansynch download works. In my case I had to create a reference to my MainPage class, and bind items in appointments_SearchCompleted method.

Simple as that.

相关阅读:
Top