Skip to content

Commit

Permalink
Fix the issue of #161
Browse files Browse the repository at this point in the history
  • Loading branch information
airtaxi committed Aug 15, 2024
1 parent da2e141 commit b4241cc
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 += (_, _) =>
Expand Down

0 comments on commit b4241cc

Please sign in to comment.