Windows phone 7 将LINQ元素作为参数传递给另一个.xaml wp7

Windows phone 7 将LINQ元素作为参数传递给另一个.xaml wp7,windows-phone-7,Windows Phone 7,是否可以将LINQ查询的结果作为参数发送到WP7中的另一个.xaml文件。 如果是,请举例说明。 提前谢谢 这是我的密码 XDocument xml = XDocument.Load("VideoContent.xml"); var content = from query in xml.Descendants("Video") where (string)query.Element("Clip") == parameter select new Video() {

是否可以将LINQ查询的结果作为参数发送到WP7中的另一个.xaml文件。 如果是,请举例说明。 提前谢谢

这是我的密码

XDocument xml = XDocument.Load("VideoContent.xml");
var content = from query in xml.Descendants("Video") where (string)query.Element("Clip") == parameter 
              select new Video() { File = (string)query.Element("File") }
现在我需要使用NAvigationService将文件中的字符串传递给另一个.xaml


另外,我对WP7和LINQ非常陌生。如果您想传递字符串值,可以将其作为导航参数传递

NavigationService.Navigate(new Uri("/NewPageName.xaml?file="+content.First().File, UriKind.Relative));
然后在新页面的OnNavigatedTo处理程序中,获得如下所示的“file”字符串值

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    {
        string file; //declare this before the page constructor

        NavigationContext.QueryString.TryGetValue("file", out file);
    }

LINQ查询还是LINQ查询的结果?LINQ的格式是什么?]是LINQ的结果。XDocument xml=XDocument.Load(“VideoContent.xml”);var content=from xml.subscriptions(“Video”)中的查询,其中(string)query.Element(“Clip”)==参数select new Video(){File=(string)query.Element(“File”)};现在我需要使用NAvigationService将文件中的字符串传递给另一个.xaml。另外,我对WP7和LINQ非常陌生