【发布时间】:2013-01-09 10:03:41
【问题描述】:
是否可以将 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 将 File 中的字符串传递给另一个 .xaml。
P.S 我对 WP7 和 LINQ 很陌生
【问题讨论】:
-
LINQ 查询或 LINQ 查询的结果?你的 LINQ 的格式是什么?]
-
是 LINQ 的结果。 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 将 File 中的字符串传递给另一个 .xaml。 P.S 我对 WP7 和 LINQ 很陌生
标签: windows-phone-7