Unplanned
Last Updated: 26 Feb 2018 16:24 by ADMIN
ADMIN
Hristo
Created on: 18 Oct 2017 12:49
Category: Form
Type: Bug Report
4
FIX. RadForm - at run-time the ClientSize is increased compared to the serialized in the designer value
How to reproduce: set the Size property of the form in the designer of Visual Studio, pay attention to the serialized ClientSize value. Run the form and check the ClientSize, it has increased

Workaround: 
public partial class Form2 : RadForm
{
    public Form2()
    {
        InitializeComponent();
        Padding p = TelerikDpiHelper.ScalePadding(this.FormBehavior.ClientMargin, new SizeF(1f / this.RootElement.DpiScaleFactor.Width, 1f / this.RootElement.DpiScaleFactor.Height));
        this.MaximumSize = new Size(this.Size.Width - p.Horizontal, this.Size.Height - p.Vertical- this.FormBehavior.ClientMargin.Bottom + this.FormElement.TitleBar.Size.Height);
    }

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

        this.MaximumSize = new Size(0, 0);
    }
}
3 comments
ADMIN
Hristo
Posted on: 26 Feb 2018 16:24
Hi Fernando,
Can you please open a support ticket and send us the problematic form with details how the issue can be reproduced?

Regards,
Hristo
Fernando
Posted on: 16 Jan 2018 23:15
I didn't work for me as well.
Jeff
Posted on: 18 Oct 2017 16:13
This didn't work for me.