diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 11aad6e8..cc4dc9f9 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 e44dad16..093cc9c0 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 72c7cd78..40f6f293 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 1ce47ba2..300dbd60 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 f953e896..75048fbe 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 633fa041..7a0ab37d 100644 --- a/SunnyUI/Controls/UINavBar.cs +++ b/SunnyUI/Controls/UINavBar.cs @@ -64,7 +64,25 @@ namespace Sunny.UI public int Radius { get => radius; - set => radius = Math.Max(0, value); + set + { + radius = Math.Max(0, value); + Invalidate(); + } + } + + private bool showItemsArrow = true; + + [DefaultValue(true)] + [Description("显示子节点提示箭头"), Category("SunnyUI")] + public bool ShowItemsArrow + { + get => showItemsArrow; + set + { + showItemsArrow = value; + Invalidate(); + } } protected override void OnSizeChanged(EventArgs e) @@ -465,7 +483,7 @@ namespace Sunny.UI e.Graphics.DrawString(node.Text, Font, textColor, NodeX + i * NodeSize.Width + (NodeSize.Width - sf.Width) / 2.0f, NodeY + (NodeSize.Height - sf.Height) / 2); } - if (node.Nodes.Count > 0) + if (ShowItemsArrow && node.Nodes.Count > 0) { SizeF imageSize = e.Graphics.GetFontImageSize(61703, 24); if (i != SelectedIndex) diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs index 9ecdabea..972a5916 100644 --- a/SunnyUI/Controls/UINavMenu.cs +++ b/SunnyUI/Controls/UINavMenu.cs @@ -81,6 +81,20 @@ namespace Sunny.UI [Description("只显示一个打开的节点"), Category("SunnyUI")] public bool ShowOneNode { get; set; } + private bool showItemsArrow = true; + + [DefaultValue(true)] + [Description("显示子节点提示箭头"), Category("SunnyUI")] + public bool ShowItemsArrow + { + get => showItemsArrow; + set + { + showItemsArrow = value; + Invalidate(); + } + } + /// /// Tag字符串 /// @@ -582,7 +596,7 @@ namespace Sunny.UI } } - if (e.Node.Nodes.Count > 0) + if (ShowItemsArrow && e.Node.Nodes.Count > 0) { e.Graphics.DrawFontImage(e.Node.IsExpanded ? 61702 : 61703, 24, ForeColor, Width - (Bar.Visible ? 50 : 30), e.Bounds.Y + (ItemHeight - 24) / 2); }