Is it possible to disable DPI scaling for Telerik controls?

1 Answer 14 Views
Form
Darren
Top achievements
Rank 1
Darren asked on 16 Apr 2025, 04:26 PM

I have a scenario where we need to manually size and position all of the controls in a certain window.  We need the size/position to be the same regardless of the DPI scaling on the system.  For standard Winforms controls, I can simply set the Window's AutoScaleMode property to 'None'.  That will prevent the controls from auto-scaling as desired.  However, if I have any Telerik controls in the Window, they are always automatically scaled no matter what I set the AutoScaleMode property to.

I know that there is a static RadControl.EnableDpiScaling property that can be used.  If I set that to false, then that will indeed disable auto-scaling for any Telerik controls.  However, that is a global setting.  I do not want to disable auto-scaling across the entire application.  I just need to disable it for a particular window.

Is this possible?

Thanks,

--Darren

1 Answer, 1 is accepted

Sort by
1
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 17 Apr 2025, 11:18 AM

Hello Darren,

Thank you for reaching out to us.

Unfortunately, Telerik does not currently provide per-form or per-control DPI scaling toggles like the built-in WinForms AutoScaleMode. However, you could prevent the internal scaling logic from executing. For example, you can create custom class that derived from a given telerik control and override the PerformRadAutoScale() method. The following example demonstrate how you can do this for a RadButton:

class NotScallableRadButton: RadButton
{
 protected override void PerformRadAutoScale(BoundsSpecified? specified = null)
 {
        //base.PerformRadAutoScale(specified);
 }
    public override string ThemeClassName
    {
        get
 {
            return typeof(RadButton).FullName;
 }
    }
}

Basically, you can use these custom controls for a specific forms only. I hope that this approach will work for you.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Darren
Top achievements
Rank 1
commented on 17 Apr 2025, 06:17 PM

Hi Dinko,

Thank you!  This is what I needed.

Deriving custom classes from the Telerik controls is not an issue, as I am already doing that for several of the controls I am using for this form.

Tags
Form
Asked by
Darren
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or