如何将 Silverlight 3.0 ListBox 内容导出到 Excel 和 Excel单词?

发布于 2024-08-11 04:25:39 字数 173 浏览 4 评论 0原文

ListBox 包含多个ListBox,而ListBox 又包含许多ListBoxItem。顶级 ListBox 没有绑定到 ItemsSource 集合,而子 ListBox 则具有绑定到 VM 中各个属性的 ListBoxItem。有没有办法将 ListBox“内容”转储到 Excel 文件,可以先将它们转换为 XML 格式?

The ListBox contains multiple ListBoxes which inturn contain many ListBoxItems. The top level ListBox does not have a ItemsSource collection bound to it, rather the child ListBoxes have ListBoxItems that are bound to individual properties in the VM. Is there a way to just dump the ListBox "contents" to an Excel file, may be by converting them to an XML format first??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

转瞬即逝 2024-08-18 04:25:40

您应该能够翻译这篇关于导出的文章Excel 的数据网格到您的列表框场景。在您的情况下,您需要遍历控制树来查找每个子项的子项(可能以递归方式),然后使用 xml 将其呈现到 Excel。

You should be able to translate this post on exporting a datagrid to Excel to your list box scenario. In your case you will need to walk the control tree to find the children of each child (probably in a recursive manner) and then render it to Excel using xml.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文