private void ShowSubMenu(MenuItem menuItem) { var bounds = GetItemBounds(menuItem.Index); Desktop.ShowContextMenu(menuItem.SubMenu, new Point(bounds.X, bounds.Bottom)); OpenMenuItem = menuItem; }
private void ShowSubMenu(MenuItemButton menuItem) { if (OpenMenuItem != null) { OpenMenuItem.IsPressed = false; } if (menuItem == null || !menuItem.CanOpen) { return; } Desktop.ShowContextMenu(menuItem.SubMenu, new Point(menuItem.Bounds.X, Bounds.Bottom)); Desktop.ContextMenuClosed += DesktopOnContextMenuClosed; OpenMenuItem = menuItem; }