Wndows Phone 8中的KVP ListBox [英] KVP ListBox in WIndows Phone 8
本文介绍了Wndows Phone 8中的KVP ListBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Windows Phone 8中使用带有键值对列表/词典的列表框。
How can I use a list box with Key Value Pair List/Dictionary in Windows Phone 8.
推荐答案
您无法传递词典或任何其他多个将值集合到ListBox而不指定列表框中要显示的列表的哪一部分。
因此,以字典为例,您可能希望只显示键:
You can't pass a Dictionary or any other multiple value collection to a ListBox without specifying which part of the list you want the ListBox to show.
So, to use a Dictionary as an example, you would probably want to display just the Keys:
MyListBox.DataSource = MyDictionary.Keys();
这篇关于Wndows Phone 8中的KVP ListBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文