简体   繁体   English

将多个用户控件绑定到单个集合

[英]Binding multiple User Controls to single collection

Scenario: 场景:

在此处输入图片说明

There are three things: UserControls, GridView and a Collection. 有三件事:UserControls,GridView和Collection。 There is 1:1:1 Mapping between UserControl:Grid Row: Collection Row UserControl:Grid行:Collection行之间存在1:1:1映射

The problem is how to bind a single usercontrol to a collection row. 问题是如何将单个用户控件绑定到集合行。 So if any object in collection is updated, corresponding GridView row and usercontrol should be updated automatically. 因此,如果集合中的任何对象被更新,则相应的GridView行和用户控件应自动更新。

EDIT: The complete UI would is multithreaded. 编辑:完整的UI将是多线程的。 So most of the times the original collection as a whole would never be recreated. 因此,在大多数情况下,将永远不会重新创建原始集合。 Only objects would be added/deleted/updated. 仅对象将被添加/删除/更新。

我要做的是重新绑定事件处理程序上的所有控件以进行集合更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM