I am currently creating a class library using C#. This library will be referenced using VBA in a win32 application CATIA. In the C# Solution, I have also a WPF project. Whenever I am calling a WPF UI in the class library, the scaling and resolution of CATIA changes to the DPI of the monitor. Its not the case with winForms as CATIA resolution does not change when I do a Show()
or ShowDialog()
.
I have tried a few things, like adding a manifest file and changing the dpiaware to false and dpiAwareness to unaware. but it does not seem to fix it.
Another thing that I have also noticed is that, If I call any method within the WPF Project from the main method, as long as it does not have Show()
or ShowDialog()
methods in it, the resolution remains same. So I know its not the fault of the WPF Project, but that of the window.
I have tried to add a manifest file and change the DPI settings manually, but they do not seem to work.