diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 05953af2..b3c52def 100644 Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 39a57036..98b472f6 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index 1bdf9876..58c05c01 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -70,6 +70,10 @@ namespace Sunny.UI showTitleIcon = false; } + [DefaultValue(true)] + [Description("是否点击标题栏可以移动窗体"), Category("SunnyUI")] + public bool Movable { get; set; } = true; + public void Translate() { List controls = this.GetTranslateControls("ITranslate"); @@ -648,7 +652,7 @@ namespace Sunny.UI if (!ShowTitle) return; if (e.Y > Padding.Top) return; - if (e.Button == MouseButtons.Left) + if (e.Button == MouseButtons.Left && Movable) { FormMoveMouseDown = true; FormLocation = Location;