有没有数据绑定的无形的防治工作? [英] Does data binding work on invisible control?

查看:96
本文介绍了有没有数据绑定的无形的防治工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个.NET问题的WinForms,而不是asp.net。

This is a .net problem with winforms, not asp.net.

我有一个窗口的形式有几个选项卡。我将所有控制数据绑定,当窗体加载。但我注意到,控件的第二个选项卡上的数据绑定不工作。这些绑定只有当​​窗体加载工作,当我选择了第二个选项卡。这使怀疑我:数据绑定只有工作的时候绑定控件可见

I have a windows form with several tabs. I set data bindings of all controls when the form is loaded. But I have noticed that the data bindings of controls on the second tab do not work. Those bindings work only when the form is loaded and when I select the second tab. This brings the suspicion to me: data bindings work only when bound controls become visible.

任何人都可以告诉我这是否是真还是假?不难对此进行测试,但我想知道一些确认。

Anyone can tell me whether this is true or not? It is not hard to test this but I would like to know some confirmation.

感谢

推荐答案

您是正确的。数据绑定控件不更新,直到控制变得可见。

You are correct. A data-bound control are not updated until the control is made visible.

唯一的参考,我可以找到这个目前是<一个href="http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/70f0bbbb-07d5-4253-9a79-789700a8450a"相对=nofollow>这个MSDN线程。

The only reference I can find for this at the moment is this MSDN thread.

这篇关于有没有数据绑定的无形的防治工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆