Declined
Last Updated: 22 Nov 2024 08:54 by ADMIN
Henri
Created on: 15 Nov 2024 03:13
Category: UI for WinForms
Type: Bug Report
1
RadForm incorrectly resized when DPI scaling is greater than 100%.

Hi, all. I am using the example you guys provide in your website and you can get from here: https://www.telerik.com/blogs/winforms-scaling-at-large-dpi-settings-is-it-even-possible-#example

As you can see in the image, I open the form in my main screen with Scale 100%. I have a second screen running in 150%. When I grab the form near to the left edge side of it, it resizes in one way, what I believe that is the correct way. However, if you grab the form near to right edge side, near the minimize, maximize and close button, it resizes differently. We have several users using our application and we are not able to fix this scalling issue, even in your own example. Could you guys have a look at it and prioritize? This kind of issue has been around for a long time without a final resolution. if not possible, let us know that we will have to decide move to another development tool.

Telerik version: 2024.2.514

4 comments
ADMIN
Nadya | Tech Support Engineer
Posted on: 22 Nov 2024 08:54

Hello, Henri, 

Thank you for the project. I run it on my side on 150% monitor scaling using the PerMonitorV2 setting but I did not have the same result as you. I recorder a small video to demonstrate the result on my end. The RadButton put on a form looks bigger on high dpi, but this is normal. However, the form is not resizing on my side. Can you please check the attached gif file. 

I have also made some test by switching from PerMonitor to PerMonitorV2 and vice versa, but the form runs correctly. However, I am really sorry that you are experiencing any difficulties with the Telerik UI for WinForms suite on high dpi. I will provide you several things that I hope it can be useful for you in this case.

I would recommend you to take a look at the listed tips and tricks in the following KB article >> Tips and tricks for Designing Scalable WinForms. It is important to design your forms under 96 DPI (100%), nevertheles you are running the form later on higher dpi. Because Visual Studio will serialize the scaling size of the form at design time and there are often problems when the form has been designed under higher DPI. Design the interface of your forms so that it can “reflow” – use Anchored, Docked, AutoSized controls where possible. In your test project that you provide I checked the AutoScaleDimensions property in the designer file and it is serialized with correct default value SizeF(6F, 13F). You can check the AutoScaleDimensions on your other forms and ensure they have its default value. 

Another thing that I can suggest, it is good to consider arranging the UI within the MS TableLayoutPanel when creating a DPI-aware application. Thus, the controls do not have specific location and size. This way when the form is resized the controls will fit in the available space.

I hope this information is useful in future when working on dpi-aware applications. Please let me know if I can assist you further. 

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files:
Henri
Posted on: 19 Nov 2024 20:03

Hi Nadya, thanks for you feedback. But this problem is not just related to the anchoring. Even a new form with just a button without anchor when using the PerMonitorV2, has an form resizing issue. The issue is not just with anchor.

app.manifest

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"
                xmlns:asmv1="urn:schemas-microsoft-com:asm.v1"
                xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>

  <asmv3:application>
    <asmv3:windowsSettings>
  <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, System</dpiAwareness>
  <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
</asmv3:windowsSettings>
  </asmv3:application>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- A list of all Windows versions that this application is designed to work with. 
      Windows will automatically select the most compatible environment.-->
      <!-- Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
      <!-- Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <!-- Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!-- Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!-- Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>

    </application>
  </compatibility>
</asmv1:assembly>

When loaded in 100%

Moving to a screen with 150%.

I am attaching the project, but you can create your own to test, the issue will be the same when using PerMonitorV2. PerMonitor works fine, but has issues when anchoring as you discussed here.

Attached Files:
ADMIN
Nadya | Tech Support Engineer
Posted on: 19 Nov 2024 09:02

Hello, Henri,

The provided project is greatly appreciated. I was able to reproduce the problem and investigate the setup.

I noticed that you use anchors for the controls such as dropdownlist, treeview, buttons, etc. I would like to note that we already have a known issue regarding using the right anchors for controls: WinForms: Controls with Right anchors are not scaled correctly on higher DPI

This issue has already been escalated to our development team and its priority is increased. We always strive to address important and emerging issues for our clients. However, I can not give you an exact time frame for when it should be fixed due to many factors such as the complexity of the issue, priority, available resources, and others. 

You can subscribe to the item to get notified once its status has changed. Until then, what I can suggest is not using the right anchoring, if possible, to avoid layout issues. I understand that this may not be suitable for you, but at this moment I am not able to suggest another work for this issue. Please accept our apologies for the inconvenience that this is causing to your users.

Meanwhile, I am changing the status of this bug report since the issue is already logged and I relate them in our internal issue tracking system.

Please let me know if I can assist you further. 

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Henri
Posted on: 17 Nov 2024 22:35

Hi all,

Just adding more information to my findings: it seems to work fine if you don't use PerMonitorV2 and use PerMonitor. However, if I start my application on a monitor with a scaling factor of 150%, for example, and have controls anchored to the bottom and right, they don’t scale correctly.

Let me know if further details are needed.