Telerik WinForms 2025.Q2 radForm C# resize problem

2 Answers 45 Views
Form
ALEXANDRU
Top achievements
Rank 1
Iron
ALEXANDRU asked on 22 May 2025, 12:06 PM

Hello Telerik team,

After upgrading to Telerik WinForms 2025.Q2, I’ve encountered several issues related to form layout rendering at runtime, which were not present before the update.

Enviroment:

.NET Framework 4.8.1
RadForm (not RadRibbonForm)
DPI awareness set to system in app.manifest
AutoScaleMode = Dpi

Could you please confirm if these layout behaviors are intentional in 2025.2 and whether there is an official workaround or setting to restore the previous behavior?

Thank you!

runningnet
Top achievements
Rank 1
commented on 22 May 2025, 05:17 PM

We are encountering the same issue too.
Blas
Top achievements
Rank 1
commented on 23 May 2025, 11:24 AM

I have the same problem after upgrading, but it only happens when I show a radform in modal mode.

 

Nadya | Tech Support Engineer
Telerik team
commented on 23 May 2025, 07:32 PM

Hello,

David and Blas, I have already responded to the separate tickets you submitted. Let's continue our discussion there. 

2 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 23 May 2025, 07:29 PM

Hello, ALEXANDRU,

I am sorry to hear that you encountered an issue after upgrading to the latest 2025 Q2 version.

We have introduced some changes regarding RadForm in our 2025.2.520 version. However, in order to determine if there is an issue in our latest version, we should isolate the issue first and make further investigation. Can you help me replicating your problem?

It would be of great help if you can mimic your setup that can reproduce the problem with the latest version. Thus, we should be able to make an adequate analysis and investigate in more depth.

Looking forward to your reply.

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.

0
ALEXANDRU
Top achievements
Rank 1
Iron
answered on 24 May 2025, 07:35 AM

Hello Nadya,

I have attached a project that exemplifies the problem I faced, after updating to version 2025.2.520.462.

Thank you!

Nadya | Tech Support Engineer
Telerik team
commented on 26 May 2025, 12:16 PM

Hello, ALEXANDRU,

The provided project is greatly appreciated. I updated your Telerik Points as a gesture of gratitude for your help in reproducing the issue.

Based on it, and also on the information provided by @Blas and @David, we were able to isolate a problem with ClientSize on inherited RadForms. This seems to be a regression related to another bug that we fixed in our latest Q2 2025 version. Please accept our apologies for this undesired behavior. We will do our best to fix this as soon as possible and include the fix in a future preview version.

This issue is already logged in our feedback portal: RadForm: ClientSize on inherited RadForm is broken 

I would like to let you know that we are already investigating it. However, we need more time to make a deeper investigation and testing until we announce the fix. Until then, we managed to find a workaround for you. The workaround is to override the SetClientSize method of the inherited RadForm - you can see the whole solution in the feedback item. Note, this workaround should not break the existing behavior of the other RadForms, so you can safely use it on your inherited forms.

public partial class RadForm2 : RadForm1
{
    protected override void SetClientSizeCore(int x, int y)
    {
        base.SetClientSizeCore(x, y);

        if ((!this.IsLoaded || !this.IsHandleCreated) &&
            this.IsInitialized)
        {
            MethodInfo mi = typeof(Form).GetMethod("SetClientSizeCore", BindingFlags.NonPublic | BindingFlags.Instance);
            if (mi != null)
            {
                IntPtr ptr = mi.MethodHandle.GetFunctionPointer();
                Action<int, int> baseSetClientSizeCore = (Action<int, int>)Activator.CreateInstance(
                    typeof(Action<int, int>), this, ptr);

                baseSetClientSizeCore.Invoke(x, y);
            }
        }
    }
}

I also updated your project to reflect the suggested changes. You can see the result of your Derivated RadForm in the attached picture. The updated project is also attached. 


I hope this helps. Please let me know if I can assist you further. 

Tags
Form
Asked by
ALEXANDRU
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
ALEXANDRU
Top achievements
Rank 1
Iron
Share this question
or