开发者

Wpf element host flickering issue

I have an element host with one WPF control (with only a texblock in it for ex) on winform. When my application loads, the hosted control is taking few seconds and it shows a white background for few secs and after only i开发者_如何学Pythont gets loaded t. Is there any way to avoid this.. Any ideas are appreciated.

I'm using Microsoft visual studio 2008


I guess you're using a WPF hosting control inside Windows Forms? My guess is that the WPF stack is initializing and that's what's taking a lot of time.

My suggestions would be twofold:

  • I understand that they did some improvements to the WPF stack's loading time in .NET 4.0. Try upgrading your project to .NET 4.0 and see if this improves.

  • When your application starts up initially, try putting in a hidden area in your startup screen which would cause the WPF stack to initialize, so this performance penalty is paid at start time and not at a jarring time during the normal running of your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜