开发者

Binding Listbox to Array of Lists

I have 10 Listboxes and an array of 1000 Lists of 开发者_如何学JAVAstring. I need to fill the listboxes from the Array dpending on the Array Index. Is this possible with binding or have to do it manually?


<ListBox ItemsSource="{Binding MyArrayOfLists[0]}".../>
<ListBox ItemsSource="{Binding MyArrayOfLists[1]}".../>
<ListBox ItemsSource="{Binding MyArrayOfLists[3]}".../>
...

Is that what you mean?


I mean this statment is not possible right in XAML? But can it be done through code?


I have listboxes named listBox1, listBox2, listBox3 etc. Is there a way to name then like an array - listbox[1], listbox[2], listbox[3] - so that I can access them like an array - listBox[Index]?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜