0

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.

Kevin Gosse
  • 38,392
  • 3
  • 78
  • 94
a_dzik
  • 927
  • 2
  • 11
  • 24

1 Answers1

0

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.

a_dzik
  • 927
  • 2
  • 11
  • 24