문제

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???

도움이 되었습니까?

해결책

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;
        ......
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top