开发者

How to export Silverlight 3.0 ListBox contents to Excel & Word?

开发者 https://www.devze.com 2022-12-10 15:02 出处:网络
The ListBox contain开发者_开发技巧s 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

The ListBox contain开发者_开发技巧s 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??


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消