Windows phone 如何在windows phone中以字符串形式获取约会的详细信息?

Windows phone 如何在windows phone中以字符串形式获取约会的详细信息?,windows-phone,appointment,Windows Phone,Appointment,我正在使用此代码在windows phone 8中获取约会 private void SearchAppointments_Click(object sender, RoutedEventArgs e) { Appointments appts = new Appointments(); appts.SearchCompleted += new EventHandler<AppointmentsSearchEventArgs>(Appointments_SearchC

我正在使用此代码在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);
}
private void searchappointment\u单击(对象发送者,路由目标)
{
预约appts=新预约();
appts.SearchCompleted+=新事件处理程序(约会\u SearchCompleted);
appts.SearchAsync(DateTime.Now,DateTime.Now.AddDays(7),20);
}
现在我需要以字符串形式获取约会的主题(或位置等) 有人能帮我吗?

如中所述,您可以从
SearchCompleted
事件处理程序中的
e.Results
获取搜索约会结果:

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;
        ......
    }
}

不客气。正如人们经常提醒的那样:“如果有帮助的话,不要忘记”