diff --git a/src/libs/H.NotifyIcon.Shared/TaskbarIcon.ContextMenu.WinUI.SecondWindow.cs b/src/libs/H.NotifyIcon.Shared/TaskbarIcon.ContextMenu.WinUI.SecondWindow.cs index 8682d46..44de719 100644 --- a/src/libs/H.NotifyIcon.Shared/TaskbarIcon.ContextMenu.WinUI.SecondWindow.cs +++ b/src/libs/H.NotifyIcon.Shared/TaskbarIcon.ContextMenu.WinUI.SecondWindow.cs @@ -122,12 +122,17 @@ private void PrepareContextMenuWindow() flyoutItemBase.Padding = new Thickness(11, 0, 11, 0); } flyout.Items.Add(flyoutItemBase); - flyoutItemBase.Tapped += (_, _) => + + // MenuFlyoutSubItem should not be clickable and should not close the context menu + if (flyoutItemBase is not MenuFlyoutSubItem) { - IsContextMenuVisible = false; - flyout.Hide(); - _ = WindowUtilities.HideWindow(handle); - }; + flyoutItemBase.Tapped += (_, _) => + { + IsContextMenuVisible = false; + flyout.Hide(); + _ = WindowUtilities.HideWindow(handle); + }; + } } frame.Loaded += (_, _) =>