* UIPanel:修改大小变化时重绘

This commit is contained in:
Sunny 2020-11-08 21:09:59 +08:00
parent f2b0bccc2e
commit 46f54abce3
3 changed files with 14 additions and 2 deletions

Binary file not shown.

View File

@ -51,7 +51,13 @@ namespace Sunny.UI
Version = UIGlobal.Version; Version = UIGlobal.Version;
base.Font = UIFontColor.Font; base.Font = UIFontColor.Font;
Size = new Size(100, 35); Size = new Size(100, 35);
base.MinimumSize = new System.Drawing.Size(1, 1); base.MinimumSize = new Size(1, 1);
}
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
Invalidate();
} }
/// <summary> /// <summary>
@ -272,7 +278,7 @@ namespace Sunny.UI
} }
} }
private bool useDoubleClick = false; private bool useDoubleClick;
[Description("是否启用双击事件"), Category("SunnyUI")] [Description("是否启用双击事件"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]

View File

@ -60,6 +60,12 @@ namespace Sunny.UI
base.MinimumSize = new System.Drawing.Size(1, 1); base.MinimumSize = new System.Drawing.Size(1, 1);
} }
protected override void OnSizeChanged(EventArgs e)
{
base.OnSizeChanged(e);
Invalidate();
}
/// <summary> /// <summary>
/// Tag字符串 /// Tag字符串
/// </summary> /// </summary>