多选WinForms列表框中的双向绑定? [英] Two Way Binding on Multi-select WinForms Listbox?
问题描述
我有另一个实体对象有一个集合,我想以某种方式绑定到SelectedItems。
有没有办法使用对象绑定源或某种绑定源而不编写代码?当然,我可以循环收集并获取所选项目,但我更愿意使用Windows数据绑定更干净地执行。
这是可能吗?
不幸的是你无法绑定SelectedItems(或CheckedListBox中的CheckedItem)...我无法知道我希望有多少次可能!
I have a project where we are loading a multi-select listbox from a collection of objects.
I have another entity object that has a collection that I want to bind to SelectedItems somehow.
Is there any way to do this using object binding sources or some kind of binding source without writing code? Sure I can loop through the collection and get the selected items but I'd prefer to do it more cleanly with windows data-binding.
Is this possible?
Unfortunately you can't bind the SelectedItems (or CheckedItems in CheckedListBox)... I can't tell how many times I wished it were possible !
这篇关于多选WinForms列表框中的双向绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!