/// <summary> /// Creates an always clickable do nothing menu item with an icon. /// </summary> /// <param name="menuIcon"> The icon for the menu item. </param> /// <param name="menuText"> Text to be displayed on the menu item. </param> /// <param name="weight"> Higher the weight lower it appears. Think of the menu like water and heavier items sink to the bottom. </param> /// <returns> A menu item. </returns> public static IMenuItem CreateMenuItem(Image menuIcon, string menuText, double weight) { return(MenuItemFactory.CreateMenuItem(MenuItemFactory.AlwaysSelectableNoop, menuIcon, menuText, weight, MenuType.MenuItem, null)); }
/// <summary> /// Creates a menu item with the parameters listed below /// </summary> /// <param name="menuCommand"> The ICommand for the menu item to bind to. </param> /// <param name="menuIcon"> The icon for the menu item. </param> /// <param name="menuText"> Text to be displayed on the menu item. </param> /// <param name="weight"> Higher the weight lower it appears. Think of the menu like water and heavier items sink to the bottom. </param> /// <param name="commandParameter"> Parameter that will be passed to the ICommand's Execute </param> /// <returns></returns> public static IMenuItem CreateMenuItem(ICommand menuCommand, Image menuIcon, string menuText, double weight, object commandParameter) { return(MenuItemFactory.CreateMenuItem(menuCommand, menuIcon, menuText, weight, MenuType.MenuItem, commandParameter)); }
/// <summary> /// Creates a separator for the menu. /// Generally used along with MenuItemBuilder. /// </summary> /// <param name="weight"> Higher the weight lower it appears. Think of the menu like water and heavier items sink to the bottom. </param> /// <returns> A separator.</returns> public static IMenuItem CreateSeparator(double weight) { return(MenuItemFactory.CreateMenuItem(null, null, null, weight, MenuType.Separator, null)); }