Completed
Last Updated: 01 Jul 2019 14:56 by ADMIN
Release R3 2019 (LIB 2019.2.708)
Honza
Created on: 13 Jun 2019 06:55
Category: RibbonBar
Type: Bug Report
1
RadRibbonForm: Inconsistent padding when the form is Maximized and its AllowAero property is set to true
Maximizing the form cuts off the RadRibbonBar and decreases the content padding.
3 comments
ADMIN
Hristo
Posted on: 13 Jun 2019 11:09
Hi Honza,

I would like to assure you that the RadRibbonForm is a very important control. It is also a very complex one, as the incorporated RadRibbonBar handles the non-client area of the form in its title bar.  Please also note that my code snippet is just a workaround which I hope would fit your local setup. 

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Honza
Posted on: 13 Jun 2019 07:12

Hello Hristo,

thank you for your help. But what about to fix it directly in the RadRibbonForm? I know it's probably not the most important control you have, but maybe you can fix it there.

Nevertheless, thank you.

Regards,

Jan


ADMIN
Hristo
Posted on: 13 Jun 2019 06:57
Hello,

The issue can be worked around by setting the form`s padding when the form is maximized: 
public partial class Form1 : Telerik.WinControls.UI.RadRibbonForm
{
    private FormWindowState lastWindowState;
 
    public Form1()
    {
        InitializeComponent();
 
        this.SizeChanged += this.Form1_SizeChanged;
    }
 
    private void Form1_SizeChanged(object sender, EventArgs e)
    {
        if (this.lastWindowState != this.WindowState)
        {
            if (this.WindowState == FormWindowState.Maximized)
            {
                this.Padding = new Padding(4, 0, 4, 0);
            }
            else if (this.WindowState == FormWindowState.Normal)
            {
                this.Padding = Padding.Empty;
            }
 
            this.lastWindowState = this.WindowState;
        }
    }
}

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.