This is a migrated thread and some comments may be shown as answers.

Workbook affecting Winforms

1 Answer 65 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 21 Aug 2019, 01:05 AM

I have a Winforms project that has been working just fine.

Recently, I decided to add an export to Excel spreadsheet feature. I am using the documentprocessing spreadsheet API. As soon as I perform a "new Workbook" call, my WinForms windows shrink if... and only if... I have the display font scaling set to 125% or more. It behaves fine at 100%.

Why if I instantiate a Workbook does it affect the WinForms views?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 21 Aug 2019, 09:28 AM
Hi Joe,

This happens when the application becomes DPI-aware at run-time.The DPI-awareness is declared on assembly level in some WPF assemblies which we depend on. When a type from such assembly is initialized the application becomes DPI-aware.

There are two solutions for this: 

• Make the application DPI-aware explicitly. Detailed information is available here: DPI Support
• Explicitly make the app DPI-Unaware. This is explained in the following article (last section): HDPI Tips and Tricks

I hope this will be useful. Let me know if you have additional questions.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Spreadsheet
Asked by
Joe
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or