Browse Source

1. Revise UIMenu item hidden Bug;

niuyx 2 days ago
parent
commit
199377059f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      CyberX8_UI/Views/ShellView.xaml.cs

+ 4 - 4
CyberX8_UI/Views/ShellView.xaml.cs

@@ -247,7 +247,7 @@ namespace CyberX8_UI.Views
                 for (int j = 0; j < item.MenuItem.Count; j++)
                 {
                     SubItem subitem = item.MenuItem[j];
-                    if (!item.IsShow)
+                    if (!subitem.IsShow)
                     {
                         continue;
                     }
@@ -258,7 +258,7 @@ namespace CyberX8_UI.Views
                             for (int k = 0; k < subitem.MenuItem.Count; k++)
                             {
                                 SubItem secSubItem = subitem.MenuItem[k];
-                                if (!string.IsNullOrEmpty(secSubItem.View))
+                                if (!string.IsNullOrEmpty(secSubItem.View) && secSubItem.IsShow)
                                 {
                                     TabItem tabItem = _multiMenuItemsDictionary[$"{secSubItem.Name}.{secSubItem.Id}"];
                                     Control control = (tabItem.Content as Control);
@@ -308,7 +308,7 @@ namespace CyberX8_UI.Views
                 for (int j = 0; j < item.MenuItem.Count; j++)
                 {
                     SubItem subitem = item.MenuItem[j];
-                    if (!item.IsShow)
+                    if (!subitem.IsShow)
                     {
                         continue;
                     }
@@ -320,7 +320,7 @@ namespace CyberX8_UI.Views
                             for (int k = 0; k < subitem.MenuItem.Count; k++)
                             {
                                 SubItem secSubItem = subitem.MenuItem[k];
-                                if (!string.IsNullOrEmpty(secSubItem.View))
+                                if (!string.IsNullOrEmpty(secSubItem.View) && secSubItem.IsShow)
                                 {
                                     if (_multiMenuItemsDictionary.ContainsKey($"{secSubItem.Name}.{secSubItem.Id}"))
                                     {