的WinForms控制时间太长加载 [英] WinForms control takes too long to load

查看:146
本文介绍了的WinForms控制时间太长加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个WPF应用程序,我有承载使用WindowsFormsHost一个双赢的形式RichTextBox控件的用户控件。用户控件在被在某个时间变得可见面板使用。问题是,该形式的控制是在包含面板前显示几分钟。我试图拖延RTB的显示,直到显示面板,但随后被加载形式的控制,当UI冻结2-4秒。如果你知道一个解决方案,以控制加载速度,请帮助。谢谢!

In a WPF application I have a user control that hosts a win forms RichTextBox control using the WindowsFormsHost. The user control is used in a panel that is made visible at a certain time. The problem is that the forms control is displayed a few moments before the containing panel. I tried delaying the display of the RTB until the panel is shown, but then the UI freezes for 2-4 seconds when the forms control is loaded. Please help if you know a solution to make the control load faster. Thanks!

推荐答案

我设法找到解决这个:)其实,WindowsFormsHost有一个透明的背景设定,只是删除透明度解决了性能问题。

I managed to find a solution for this :) Actually, the WindowsFormsHost had a Transparent background set, and just removing the transparency solved the performance problem.

这篇关于的WinForms控制时间太长加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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