【发布时间】:2015-08-24 20:06:58
【问题描述】:
我有一个支持Multi-Select 的ListBox,我需要一种将所有选定索引作为List<int> 检索的方法。
例如:
Listbox
{
item 1 - not selected
item 2 - selected
item 3 - selected
item 4 - not selected
}
所以选定的索引List<int> 将如下所示:
List<int>() { 1, 2 };
【问题讨论】:
-
类似“字符串文本 = listBox1.GetItemText(listBox1.SelectedItem);”也许?
标签: c# wpf collections listbox