开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜