是否有一个"所有儿童装"事件在WPF [英] Is there a "All Children loaded" event in WPF

查看:105
本文介绍了是否有一个"所有儿童装"事件在WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在听一个页面的加载的事件。这一事件触发,然后再所有的孩子激发他们的load事件。我需要的时候所有的孩子都加载的触发一个事件。这是否存在?

I am listening for the loaded event of a Page. That event fires first and then all the children fire their load event. I need an event that fires when ALL the children have loaded. Does that exist?

推荐答案

我听你的。我也很想念一个出WPF盒解决方案这一点。

I hear you. I also am missing an out of the box solution in WPF for this.

有时候你希望所有的子控件加载后执行一些代码。

Sometimes you want some code to be executed after all the child controls are loaded.

在父控件

Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => {code that should be executed after all children are loaded} ));



帮了我几次到现在。

Helped me a few times till now.

这篇关于是否有一个"所有儿童装"事件在WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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