ItemsControl绑定完成事件 [英] ItemsControl binding complete event

查看:126
本文介绍了ItemsControl绑定完成事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   

   Hi,

   在将新值设置为ItemsSource后,找出ItemsControl的项绑定何时完成的最佳方法是什么?在我的情况下,设置ItemsSource值和显示数据之间可能需要几秒钟的时间。
我需要在显示数据后执行某些操作。此外,虽然发生UI的绑定没有响应。有没有办法解决它?

   What is the best way to find out when the items binding for ItemsControl is completed after setting new value into the ItemsSource? In my case it can take up to a couple of seconds between setting ItemsSource value and the data is displayed. I need to do certain actions after the data is displayed. Besides, while the binding happening the UI is not responsive. Is there a way to fix it?

谢谢

Alex

推荐答案

我认为没有任何绑定事件已完成。

I don't think there is any event for binding completed.

但是下面的代码应该有帮助 

But following code should help 

MyListBox.Dispatcher.BeginInvoke(new Action(delegate()
                {
                    //Your code
                    //MessageBox.Show("GAURAV");
                }));


这篇关于ItemsControl绑定完成事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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