WPF绑定用户娱乐 [英] WPF Binding User Entertainment

查看:90
本文介绍了WPF绑定用户娱乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经遇到了一个情况我有一个ItemsControl生成一个数据收集pretty的复杂的可视化树,死的简单:

I have ran into a situation where I have an ItemsControl generate a pretty complex visual tree from a data collection, dead simple:

<ItemsControl ItemsSource="{Binding Items}"/>

小我的问题是,当出现初始绑定建设可能需​​要的时间显着时,将其(从1/2秒〜2秒,这取决于树的复杂性在任何地方),建筑本身。在此期间,用户界面​​线程完全不响应(挂起动画,点击量是未注册的,等等)。

The small problem I have is when the initial binding construction occurs it can take a "noticeable" amount of time when it is building itself (anywhere from 1/2 a second to 2 seconds depending on tree complexity). During this period the UI thread is completely unresponsive (animations hang, clicks are unregistered, etc).

虚拟化已经启用并正常工作,所以基本上所有我想要的是同时ItemContainerGenerator做它的事情。以播放动画的能力

Virtualization is already enabled and working, so essentially all I want is the ability to play an animation while the ItemContainerGenerator does it's thing.

推荐答案

尝试设置最绑定<一个href="http://msdn.microsoft.com/en-us/library/system.windows.data.binding.isasync%28v=vs.110%29.aspx"相对=nofollow> IsAsync = TRUE

Try setting most bindings to IsAsync=True:

<SomeControl SomeProperty="{Binding SomeData, IsAsync=True}"/>

这篇关于WPF绑定用户娱乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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