diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe
index d9a6a15c..b405f13e 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 47668c0a..30e8b352 100644
Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ
diff --git a/Bin/net45/SunnyUI.dll b/Bin/net45/SunnyUI.dll
index 0973afcc..b1d1d09f 100644
Binary files a/Bin/net45/SunnyUI.dll and b/Bin/net45/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll
index cb0870ab..b1e13613 100644
Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ
diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll
index 32fd82d6..8951b450 100644
Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ
diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll
index c0068d47..86975b1a 100644
Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ
diff --git a/SunnyUI/Controls/UINavBar.cs b/SunnyUI/Controls/UINavBar.cs
index c186412f..794d1e38 100644
--- a/SunnyUI/Controls/UINavBar.cs
+++ b/SunnyUI/Controls/UINavBar.cs
@@ -230,6 +230,26 @@ namespace Sunny.UI
}
}
+ private int selectedHighColorSize = 4;
+
+ ///
+ /// 选中页高亮高度
+ ///
+ [Description("选中Tab页高亮高度"), Category("SunnyUI")]
+ [DefaultValue(4)]
+ public int SelectedHighColorSize
+
+ {
+ get => selectedHighColorSize;
+ set
+ {
+ value = Math.Max(value, 0);
+ value = Math.Min(value, 8);
+ selectedHighColorSize = value;
+ Invalidate();
+ }
+ }
+
private UIStyle _style = UIStyle.Blue;
///
@@ -390,9 +410,9 @@ namespace Sunny.UI
e.Graphics.FillRectangle(MenuSelectedColor, rect.X, Height - NodeSize.Height, rect.Width, NodeSize.Height);
}
- if (!NavBarMenu.Visible)
+ if (!NavBarMenu.Visible && SelectedHighColorSize > 0)
{
- e.Graphics.FillRectangle(SelectedHighColor, rect.X, Height - 4, rect.Width, 4);
+ e.Graphics.FillRectangle(SelectedHighColor, rect.X, Height - SelectedHighColorSize, rect.Width, SelectedHighColorSize);
}
textColor = SelectedForeColor;
diff --git a/SunnyUI/Controls/UITabControl.cs b/SunnyUI/Controls/UITabControl.cs
index 5f96c129..681b4e8e 100644
--- a/SunnyUI/Controls/UITabControl.cs
+++ b/SunnyUI/Controls/UITabControl.cs
@@ -295,7 +295,7 @@ namespace Sunny.UI
private int tabSelectedHighColorSize = 4;
///
- /// 边框颜色
+ /// 选中Tab页高亮高度
///
[Description("选中Tab页高亮高度"), Category("SunnyUI")]
[DefaultValue(4)]
@@ -305,7 +305,9 @@ namespace Sunny.UI
get => tabSelectedHighColorSize;
set
{
- tabSelectedHighColorSize = Math.Max(value, 0);
+ value = Math.Max(value, 0);
+ value = Math.Min(value, 8);
+ tabSelectedHighColorSize = value;
Invalidate();
}
}