Why my window and other components become smaller
Moderator: Queue Moderators
Why my window and other components become smaller
The lightning chart shrink my .NET application to 100% of scale in stead of following my window setting of using 125%. How to rectify this issue?
-
- Posts: 141
- Joined: Wed Mar 27, 2019 1:05 pm
Re: Why my window and other components become smaller
Hello chin
This happens most likely because of DPI awareness. Even if you are using WinForms platform, when LightningChart is created it loads some WPF libraries, and because of this the DPI awareness of the application is automatically modified. It changes to the WPF default of ‘system aware’, and the DIP-PX factor is changed to what is defined by windows settings. If your monitor’s Scale/zoom factor is >100%, then reduction of app window will be visible.
The long answer about the issue and how to fix it is given in this forum thread:
https://forum.arction.com/viewtopic.php ... 3071#p3071
In short, you need to create an application manifest file and set <dpiAware>true</dpiAware>.
Then add the manifest toyour C# application by following these steps:
a. Right-click on your project in the Solution Explorer.
b. Select "Add New Item" from the context menu.
c. Choose "Application Manifest File" from the list of options in the dialog box that appears.
d. Next open ‘app.manifest’ file, search for ‘dpiAware’ string, uncomment relevant part and set DPI-awareness in a way you want.
Hope this helps.
Best regards,
Lasse
This happens most likely because of DPI awareness. Even if you are using WinForms platform, when LightningChart is created it loads some WPF libraries, and because of this the DPI awareness of the application is automatically modified. It changes to the WPF default of ‘system aware’, and the DIP-PX factor is changed to what is defined by windows settings. If your monitor’s Scale/zoom factor is >100%, then reduction of app window will be visible.
The long answer about the issue and how to fix it is given in this forum thread:
https://forum.arction.com/viewtopic.php ... 3071#p3071
In short, you need to create an application manifest file and set <dpiAware>true</dpiAware>.
Then add the manifest toyour C# application by following these steps:
a. Right-click on your project in the Solution Explorer.
b. Select "Add New Item" from the context menu.
c. Choose "Application Manifest File" from the list of options in the dialog box that appears.
d. Next open ‘app.manifest’ file, search for ‘dpiAware’ string, uncomment relevant part and set DPI-awareness in a way you want.
Hope this helps.
Best regards,
Lasse