2012-07-22 207 views
1

我有一个工具包中的多选列表框,我想在新页面中显示点击项目。
如何从抽头项目中提取每个项目?每个项目有4个领域。点击事件和点击项目

这是填充ListBox中的代码:我想发到其他页面的发送者和主体字段

void client_DownloadStringCompleted(object sender, 
            DownloadStringCompletedEventArgs e) 
{   
    if (e.Error == null) 
    { 
     string xml = e.Result; 
     XDocument data = XDocument.Parse(xml); 
     var persons = from query in data.Descendants("Table") 
     select new MailList 
     { 
      Sender = (string)query.Element("FromUser"), 
      Body = (string)query.Element("Message"), 
      Date = ((DateTime)query.Element("mDate")).ToString("MM/yy"), 
      Time = (string)query.Element("mTime"), 
     }; 
     EmailList.ItemsSource = persons; 
    } 
} 

谢谢。

回答

0

它很简单......

在其他页面,创建一个名为类型的邮件列表的SelectedMailingList一个公共静态变量。

点击后,设置其他页面的SelectedMailingList属性,然后导航到页面。

看看这个样。我使用相同的机制.. http://wp7pivottest.codeplex.com/

+0

你能写吗我是一个例子吗?谢谢 – 2012-07-23 07:14:40

+0

已添加链接。 – 2012-07-23 09:09:55

+0

我没有找到任何关系,我在你的例子中寻找什么。 我想在发件箱和列表框中点击项目的主体。 再次感谢s – 2012-07-23 09:32:22