开发者

How to set multiple items on LISTBOX MVVM LIGHT

I'm using MVVM Light on an SL4 app. I would like to set the selected items on a listbox after it is databound.

I have no problem when there is one item to set, but I do not know how do do this when I have to set multiple it开发者_Python百科ems in the list.


Bind the IsSelected property of the ItemContainerStyle to a bool property on the view models that are bound to ItemsSource.

You can then just set that property to true or false to select or deselect the item in the listbox.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜