Declined
Last Updated: 03 Nov 2020 11:52 by ADMIN
Stoyan
Created on: 23 Oct 2020 07:07
Category: PageView
Type: Bug Report
0
RadPageView: incorrect scaling of anchored controls inside a UserControl (DPI scaling >100%)

The layout on a monitor with 100%:

After moving the form to a monitor with higher than 100% DPI scaling, e.g. 175% or greater:

Once you switch to the first page which contains exactly the same UserControl, the layout is not correct:

 

Attached Files:
2 comments
ADMIN
Stoyan
Posted on: 23 Oct 2020 13:37

Hello,

At the core of the problem is using:

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

This will disable scaling logic and is not recommended at all, if you desire DPI scaling.

Instead use the recommended settings:

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

or

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScaleDimensions = new System.Drawing.SizeF(96, 96);

It is also highly recommended to have the same setting for all your controls/forms.

For more information on DPI scaling and good practices I suggest checking our updated blog out.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 23 Oct 2020 07:24

Hi,

In order to achieve better layout, the possible solution that I can suggest is to use a TableLayoutPanel with 3 columns and place the label, textbox and button in each of the columns. You can define fixed size for the first and last column and leave the middle column with 100% to fill the available space:

This improves the behavior on my end when moving the form between the monitors and switching the pages.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.