Dpi awareness with Framework 4.8: C1DockingTab layout restore problem

Posted by: wknauf on 22 July 2021, 3:56 am EST

  • Posted 22 July 2021, 3:56 am EST - Updated 3 October 2022, 10:49 pm EST

    See attached sample (.NET framework 4.8).

    DockingTabRestoreLayout.zip

    To reproduce the issue, you need a recent Win10 with two screens. One screen is at 100%, the other at 125%. When the app is started (on my machine on the screen with 100%), move the dialog form to the other screen (125% scaling) and close it => the C1DockingTab layout is saved.

    Then restart the app => the layout is restored.

    On my machine, the app was reopened on the screen with 100% scaling. But the width of the C1DockingTabPage is the width of the 125% screen.

    This will increase every time you repeat the steps.

    Seems the layout stores the current widths, but it should store unscaled widths (at 100%) and on restore, the width should be re-scaled again.

    Best regards

    Wolfgang

  • Posted 23 July 2021, 4:31 am EST

    Hi,

    We have reported this to the development team and will let you know as soon as we have an update.

    Regards

    Avnish

    [Internal Tracking ID: C1WIN-25366]

  • Posted 29 September 2021, 5:37 am EST - Updated 3 October 2022, 10:49 pm EST

    In the changelog for .520, you wrote:

    [C1DockingTab] C1DockingTab SaveLayout and RestoreLayout methods did not take scaling into account. (Jira:C1WIN-25366)

    This does not seem to be fully fixed: when you move the sample app to the screen with 125% scaling, close it and reopen it (was restored on the 100% screen for me), then the C1DockingTab width is a bit larger. This increases each time you repeat the steps.

    Best regards

    Wolfgang

  • Posted 30 September 2021, 4:56 am EST

    Hi Wolfgang,

    We could observe the same behavior at our end. We have reported it to the development team and will let you know as soon as we have an update.

    Regards

    Avnish

  • Posted 9 December 2021, 6:29 am EST

    This was fixed in .532 and I can confirm that it works:

    [C1DockingTab] C1DockingTab sizes could change sometimes when saving and restoring layout multiple times if monitor scaling factor is more then 100%. (Jira:C1WIN-25366)

    Hopefully you also considered the situation that the initial screen has a scaling of 125%. But here, my sample form (with AutoScaleMode = Font) is not scaled at all, and the workaround from https://github.com/dotnet/winforms/issues/4854 (which should scale a form that is opened on a scaled screen) does not work either. So I cannot test it and give up dpi awareness for now…

  • Posted 14 December 2021, 7:14 am EST

    Hi,

    Sorry for the delay.

    We have forwarded your comments to the development team and will let you know as soon as we get any updates.

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels