Unplanned
Last Updated: 29 Feb 2024 10:07 by ADMIN
TestTeam
Created on: 29 Feb 2024 07:50
Category: Form
Type: Bug Report
1
RadForm: Size is changed while clicking on different forms in MDI scenario where RadForm is child of another child form
Every time I open a child form the dimensions of all the opened forms increase.
1 comment
ADMIN
Nadya | Tech Support Engineer
Posted on: 29 Feb 2024 10:07

Hello, Carlo,

You can use the following workaround:

public class BaseRadForm : RadForm
{
    private Size cachedSize;
    private Size sizeNormal;

    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);

        this.sizeNormal = this.ClientSize;
    }

    protected override void OnActivated(System.EventArgs e)
    {
        if (this.WindowState == FormWindowState.Minimized)
        {
            this.WindowState = FormWindowState.Normal;
            this.ClientSize = sizeNormal;
        }
        else if (this.cachedSize != Size.Empty && this.Size != this.cachedSize)
        {
            this.Size = this.cachedSize;
        }

        base.OnActivated(e);
    }

    protected override void OnDeactivate(System.EventArgs e)
    {
        this.cachedSize = this.Size;
        base.OnDeactivate(e);
    }
}

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.