I have created WPF application . In this application
- I am launching win form exe.
- Later make WPF window as parent of this win form.
- when I execute this application with present resolution . things work fine
But when I launch same thing through 4K Monitor(3840 * 2100) form size gets reduced.
I tried following things .
- Making win form Size to window. Maximized.
- Creating WPF manifest and uncommenting DPIaware to make WPF application DPIaware.
- manipulating size of parent window.
Any help or suggestion would be helpful. (FYI : while I tried to launch same exe from WinForms I don't see this issue).
Code snippett
/* mainwindow.xaml.cs*/
var procInfo = new System.Diagnostics.ProcessStartInfo(ExeName, arguments);
// Start the process
var ProcessObj = System.Diagnostics.Process.Start(procInfo);
var helper = new WindowInteropHelper(Window.GetWindow(this.grid1));
SetParent(ProcessHandler, helper.Handle);
/* App.manifest */
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
/*assemblyinfo.cs*/
[assembly: System.Windows.Media.DisableDpiAwareness]