private
FormWindowState lastWindowState;
public
Form1()
{
InitializeComponent();
this
.lastWindowState =
this
.WindowState;
}
protected
override
void
OnSizeChanged(EventArgs e)
{
base
.OnSizeChanged(e);
if
(
this
.lastWindowState == FormWindowState.Maximized)
{
this
.lastWindowState =
this
.WindowState;
// Option 1. Programmatically resize the form
this
.Width += 1;
this
.Width -= 1;
// Option 2. Use reflection to call the method that updates the RadRibbonBarBackstageView bounds
// MethodInfo sizeChangedMethod = this.radRibbonBarBackstageView1.GetType().GetMethod("parentControl_SizeChanged", BindingFlags.NonPublic | BindingFlags.Instance);
// sizeChangedMethod.Invoke(this.radRibbonBarBackstageView1, new object[] { this, EventArgs.Empty });
}
this
.lastWindowState =
this
.WindowState;
}