Declined
Last Updated: 14 Aug 2018 10:44 by ADMIN
some
Created on: 17 Jul 2018 14:03
Category: UI Framework
Type: Bug Report
0
Poor support for custom DPI scaling in Windows 7 - Windows 10
Poor support for custom DPI scaling in Windows 7 - Windows 10.
There no null checking, and there is dirty hacks:

CASE 1: RadPageViewElement
 public override void DpiScaleChanged(SizeF scaleFactor)
        {
            base.DpiScaleChanged(scaleFactor);

            if (this.Owner != null && this.Owner.Pages.Count > 1)
            {
                this.Owner.SuspendEvents();

                if (this.Owner.SelectedPage == this.Owner.Pages[0])
                {
                    this.Owner.SelectedPage = this.Owner.Pages[1]; // NO NULL CHECKING
                    this.Owner.SelectedPage = this.Owner.Pages[0]; // DIRTY HACK: users can have their own processing OnSelectedPage, which is unexpected here!
                }
                else
                {
                    RadPageViewPage page = this.Owner.SelectedPage;
                    this.Owner.SelectedPage = this.Owner.Pages[0];
                    this.Owner.SelectedPage = page;
                }

CASE 2:
 public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
            radWizard1.Pages.Add(new WizardPage()); // when user has 100% Dpi, this code works normally. But if user has custom scale DPI (e.g. 101%), user received System.NullReferenceException: 'Object reference not set to an instance of an object.' (because because again there is no verification for ContentArea = null)...
        }
    }

Please improve the work with custom DPI scaling!
3 comments
ADMIN
Dimitar
Posted on: 31 Jul 2018 12:30
Hi, 

I want to recommend you to use the ticketing system for specific cases. This way we will be able to privately discuss the exact case and provide you with a workaround for it.

In addition, I want to recommend setting the AutoScaleMode to DPI when using custom scaling. 

You can check the following article as well:  https://docs.telerik.com/devtools/winforms/knowledge-base/hdpi-tips-and-tricks

Regards,
Dimitar
some
Posted on: 25 Jul 2018 08:18
Thank you! As for the first check for null, I was wrong.

But the main problem is that:
1. Behavior with the standard DPI and with the custom DPI is different, and unexpected events occur that do not occur with the standard DPI.
2. Even if you setup 101% of the DPI, the interface elements "leave", and the difference is not 1%.
3. In my case #2 (above) on custom DPI we receive "null reference exception", but on 100% DPI exception will not be occured.
ADMIN
Peter
Posted on: 23 Jul 2018 12:41
Thank you for sharing this with us.

Please, note that we have a check for the null:
if (this.Owner != null && this.Owner.Pages.Count > 1) this count > 0 
We will investigate the second point in details and I will update this item.