Question

I'm using this code to get appointments in windows phone 8

private void SearchAppointments_Click(object sender, RoutedEventArgs e)
{
    Appointments appts = new Appointments();
    appts.SearchCompleted += new EventHandler<AppointmentsSearchEventArgs>(Appointments_SearchCompleted);
    appts.SearchAsync(DateTime.Now,DateTime.Now.AddDays(7),20);
}

now I need to get subject (or location & etc.) of appointments as string Can anybody help me please???

Was it helpful?

Solution

As mentioned in MSDN, you can get search appointment result from e.Results in the SearchCompleted event handler :

private void Appointments_SearchCompleted(object sender, AppointmentsSearchEventArgs e)
{
    foreach (var appointment in e.Results)
    {
        //here you can get each Appointment detail
        String location = appointment.Location;
        String subject = appointment.Subject;
        ......
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top