I have created WPF application . In this application
But when I launch same thing through 4K Monitor(3840 * 2100) form size gets reduced.
I tried following things .
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]
Make WPF dpi unaware using any of the following solutions:
/* App.manifest *
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</dpiAware>
</windowsSettings>
</application>
or
/*assemblyinfo.cs*/
[assembly: System.Windows.Media.DisableDpiAwareness]