public void ShowMenu(ViewBase view) { JumboMenu.Show( new MenuGroup(view.ViewName + " Commands", view.GetMenuCommands()), new MenuGroup("Views", AvailableViews), new MenuGroup("System", new ToggleOfflineCommand(this), ExitCommand.Instance) ); }
public static void Show(params MenuGroup[] groups) { var menu = new JumboMenu(); menu.groups = groups.Where(g => g.Any()).ToList(); menu.groups.Insert(0, new MenuGroup("Menu", new ActionCommand("Back", menu.Close))); menu.allCommands = menu.groups.SelectMany(g => g.Items).ToList(); menu.tree.ItemsSource = menu.groups; menu.ShowDialog(); }