首次互动后,WPF应用程序摊位/冻结,就像按一下按钮 [英] WPF Application stalls/freezes after first interaction, like button click

查看:168
本文介绍了首次互动后,WPF应用程序摊位/冻结,就像按一下按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前遇到在WPF的一个问题。用户界面加载罚款,但每当第一用户交互制成,如单击按钮,应用程序似乎来搪塞,或者例如,如果我有这样的显示一个消息框两个按钮,第一次点击将等待几秒钟,然后显示消息框,但任何后续的互动是瞬时的,反应灵敏。

I'm currently experiencing a problem in WPF. The UI loads fine, but whenever the first user interaction is made, such as a button click, the application seems to stall, or example if I had two buttons that display a MessageBox, the first click will wait for a few seconds then show the MessageBox, but any subsequent interaction is instantaneous and responsive.

有没有其他人经历过这个?如果是的话,有没有解决方案?

Has anyone else experienced this? And if so, is there any solution?

感谢

推荐答案

我有同样的问题。每次我打电话从按钮的首次互动的ICommand 用户界面将冻结像半秒。

I had the same problem. Every time I called the first interaction from a Button or ICommand the UI would freeze for like half a second.

我找到了问题与作者的提示直接从文件夹中启动应用程序。这解决了这个问题,但我也想知道为什么会这样,想着不同的是直接执行和调试的东西。

I tracked down the issue with the hint of the author to start application directly from the folder. This solved the issue, but I also wanted to know why this happens and thought about what the difference is between direct execution and debugging.

所以我想通了,的IntelliTrace 引起的冻结,因为我激活它一次调试ADO.NET应用程序这是仍处于启用状态。禁用后,UI冻结不见了。要禁用它进入调试 - >的IntelliTrace - >打开的IntelliTrace设置 - >勾去掉启用的IntelliTrace

So I figured out that IntelliTrace caused the freeze, which was still enabled since I activated it once for debugging an ADO.NET application. After disabling, the UI Freeze is gone. To disable it go to Debug -> IntelliTrace -> Open IntelliTrace Settings -> untick "Enable IntelliTrace".

这篇关于首次互动后,WPF应用程序摊位/冻结,就像按一下按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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