简体   繁体   English

Windows窗体控件无法在WPF应用程序中正常工作

[英]Windows Form control not working properly in WPF application

I have a Windows Form with progress bar, the progress bar working fine when I open the form in Windows Application, now we are migrating our windows application to wpf application. 我有一个带有进度条的Windows窗体,当我在Windows应用程序中打开窗体时,进度条可以正常工作,现在我们将Windows应用程序迁移到wpf应用程序。 We are doing this migration step-by-step, we are following below procedure in migration. 我们正在逐步进行此迁移,我们在迁移过程中遵循以下步骤。

  • Created new C# WPF application project. 创建了新的C#WPF应用程序项目。
  • Re-designed some important windows form as WPF window (MetroWindow from MahApps) 重新设计了一些重要的窗口形式作为WPF窗口(MahApps的MetroWindow)
  • Added the existing Windows form application in WPF app's project reference. 在WPF应用程序的项目参考中添加了现有Windows窗体应用程序。
  • Now, we are opening a existing project's windows form in new WPF app. 现在,我们在新的WPF应用程序中打开现有项目的Windows窗体。

In this way, the windows form that included the progress bar control not showing progress when I open the form in WPF application. 这样,当我在WPF应用程序中打开窗体时,包含进度条控件的Windows窗体就不会显示进度。

Can anyone help me to overcome this situation? 谁能帮助我克服这种情况?

您可以尝试托管的方法,其中有一些演练...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM