public IconMenuItem AddSeparator() { IconMenuItem item = new IconMenuItem() { Kind = IconMenuItemKind.Separator }; MenuItems.Add(item); return(item); }
public IconMenuItem AddMenuItem(string title, string comment, string icon, Action <object> command, object userData) { IconMenuItem item = new IconMenuItem() { Kind = IconMenuItemKind.Command, Text = title, Comment = comment, Icon = icon, Command = command, UserData = userData }; MenuItems.Add(item); return(item); }
private void MenuView_ItemTapped(object sender, ItemTappedEventArgs e) { if (BlockTap) { return; } BlockTap = true; menuView.SelectedItem = null; IconMenuItem item = (IconMenuItem)e.Item; if ((item == null) || (item.Kind == IconMenuItemKind.Separator)) { return; } item?.Command(item.UserData); OnMenuTap?.Invoke(sender, e); }
public void AddMenuItem(IconMenuItem item) { MenuItems.Add(item); }