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

Layout Elements completly messed up, maybe related to HighDPI-Mode

3 Answers 129 Views
LayoutControl
This is a migrated thread and some comments may be shown as answers.
Holger
Top achievements
Rank 1
Holger asked on 02 Apr 2020, 05:02 PM

I have several forms with RadLayoutControl that looks fine in the Designer, but then running the application, they go completely wild.

I recently enabled HDPI support, all my usercontrols without LayoutControl work fine, but LayoutControl seems to be different.

Pic1 is from Designer, Pic2 from the running application, and I created a minimal reproducable example but I'm unable to attach it here.

Yes, I put Visual Studio in the 96dpi Mode, before using the Designer.

I tested on several computers, but everywhere the same awkward result.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Apr 2020, 08:27 AM

Hello, Holger,  

We already have a known issue regarding RadLayoutControl in HDPI scenarios. You can track its progress, subscribe for status changes and add your comments on the following link: https://feedback.telerik.com/winforms/1372652-fix-radlayoutcontrol-the-layout-is-not-correct-on-150-dpi 

Due to the specificity and complexity of the issue, I am unable to suggest a suitable solution with RadLayoutControl

However, I can suggest you to consider using a TableLayoutPanel when creating a DPI-aware application. Thus, you can add as many rows/columns as you need in order to arrange the controls. Dock the controls in the respective TableLayoutPanel's cell to fill the available space. The main benefits here are:
- The controls do not have specific location and size. This way when the form is resized the controls will fit in the available space.
- You can easily set Margin between the controls instead of using anchoring.
- The application will look better when it is scaled.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Holger
Top achievements
Rank 1
answered on 07 Apr 2020, 09:06 AM
Thanks, I already stopped using RadLayoutControl, since it seems to do all it's 'magic' only in the designer and hard-codes the final positions, it's hard to modify anything programmaticly. TableLayoutPanel should do a better job, and a row-column layout, will do better in most scenarios.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Apr 2020, 12:11 PM

Hi, Holger,

I am glad that you have found a suitable approach for proceeding further with developing your application.

In my opinion, using a TableLayoutPanel is worth giving a try.

You can also have a look at the following articles which give some tips and hints about developing DPI-aware application:

https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/dpi-support 

https://docs.telerik.com/devtools/winforms/knowledge-base/hdpi-tips-and-tricks 

Should you have further questions please let me know.

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
LayoutControl
Asked by
Holger
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Holger
Top achievements
Rank 1
Share this question
or