passthrow autosize to parent form

This commit is contained in:
2024-09-06 19:55:27 +02:00
parent 2c85125338
commit 627fe525fa

View File

@@ -68,17 +68,32 @@ public partial class RadFlyoutBase : UserControl
// SVG Symbols
radButton_Cancel.SvgImage = CancelSvg;
radButton_Confirm.SvgImage = ConfirmSvg;
// Hide bars in Designer
//if (DesignMode)
//{
// tableLayoutPanel_ActionPanel.Visible = false;
// tableLayoutPanel_TitlePanel.Visible = false;
//}
}
private void FlyoutDialogBase_ParentChanged(object? sender, EventArgs e)
{
var frm = FindForm();
if (frm != null)
{
if (RegisterDialogAccept)
frm.AcceptButton = radButton_Confirm;
if (RegisterDialogCancel)
frm.CancelButton = radButton_Cancel;
if (AutoSize)
{
frm.AutoSize = true;
frm.AutoSizeMode = AutoSizeMode.GrowAndShrink;
}
}
}