105040 解决WPF窗体在WinForm中无法输入的问题

This commit is contained in:
lihanbo 2024-10-25 15:17:12 +08:00
parent ecb6f69383
commit 9d6dc663d9
2 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
namespace Sinvo.EplanHpD.Plugin
{
@ -78,6 +79,8 @@ namespace Sinvo.EplanHpD.Plugin
var columns = flexReport.Reporter.Formater.RepColumns;
var datas = flexReport.GetAllReportEntries();
var window = new MainWindow(datas, columns);
// 解决WPF窗体在WinForm中无法输入的问题
ElementHost.EnableModelessKeyboardInterop(window);
window.Show();
}
}

View File

@ -81,6 +81,7 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<Compile Include="PluginEntry.cs" />