本文整理汇总了C#中IContextMenu.Add方法的典型用法代码示例。如果您正苦于以下问题:C# IContextMenu.Add方法的具体用法?C# IContextMenu.Add怎么用?C# IContextMenu.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IContextMenu
的用法示例。
在下文中一共展示了IContextMenu.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateContextMenu
public override void OnCreateContextMenu (IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
menu.Add ("One");
menu.Add ("Two");
menu.Add ("Three");
menu.Add ("Four");
}
示例2: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu (menu, v, menuInfo);
menu.Add (0, 0, 0, "Hide App");
menu.Add (0, 1, 1, "Uninstall App");
}
示例3: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu (menu, v, menuInfo);
menu.Add(Menu.None, Resource.Id.a_item, Menu.None, "Menu A");
menu.Add(Menu.None, Resource.Id.b_item, Menu.None, "Menu B");
}
示例4: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo info)
{
base.OnCreateOptionsMenu (menu);
menu.SetHeaderTitle("Выберите действие");
menu.Add(0, MENU_ITEM_EDIT, 0, "Редактировать");
menu.Add(0, MENU_ITEM_DELETE, 0, "Удалить");
}
示例5: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
if (v.Id == Resource.Id.accountList)
{
menu.SetHeaderTitle(Strings.SelectOperationLabel);
menu.Add(Strings.EditLabel);
menu.Add(Strings.DeleteLabel);
}
}
示例6: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu(menu, v, menuInfo);
var info = (AdapterView.AdapterContextMenuInfo)menuInfo;
var id = (int)info.Id;
menu.SetHeaderTitle("Options".ToJ());
menu.Add(0, id, 1, "Rename".ToJ());
menu.Add(0, id, 2, "Delete".ToJ());
}
示例7: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo)
{
var info = (AdapterView.AdapterContextMenuInfo)menuInfo;
var note = (Note)ListAdapter.GetItem (info.Position);
// Add a menu item to delete the note
menu.Add (0, MENU_ITEM_DELETE, 0, Resource.String.menu_delete);
}
示例8: OnCreateContextMenu
public override void OnCreateContextMenu (IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu (menu, view, menuInfo);
AdapterView.AdapterContextMenuInfo info =(AdapterView.AdapterContextMenuInfo) menuInfo;
Tunnel.Client client = listAdapter[info.Position];
menu.SetHeaderTitle("Client " + client.ID+" at " + client.Address);
menu.Add(Menu.None,0,0,"Throw off");
}
示例9: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
if (v.Id == RollifyAndroid.Resource.Id.formulaListView) {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
menu.SetHeaderTitle (formulaAdapter [info.Position].Name);
String[] menuItems = {"Use", "Edit", "Delete" };
for (int i = 0; i < menuItems.Length; i++) {
menu.Add (Menu.None, i, i, menuItems [i]);
}
}
}
示例10: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
if (v.Id != Resource.Id.MyFriendsListView) return;
info = (AdapterView.AdapterContextMenuInfo)menuInfo;
menu.SetHeaderTitle(Resource.String.ContextMenuTitle);
var menuItems = Resources.GetStringArray(Resource.Array.ContextMenu);
for (var i = 0; i < menuItems.Length; i++)
{
menu.Add(Menu.None, i, i, menuItems[i]);
}
}
示例11: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu(menu, v, menuInfo);
var info = (AdapterView.AdapterContextMenuInfo)menuInfo;
var tag = info.TargetView.Tag;
if (tag == null) return;
var selectedPositionId = int.Parse(tag.ToString());
menu.SetHeaderTitle("Options".ToJ());
foreach (var contextItem in _presenter.GetContextItems())
{
menu.Add(0, selectedPositionId, contextItem.Order, contextItem.Title.ToJ());
}
}
示例12: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu (menu, v, menuInfo);
Logging.Log (this, Logging.LoggingTypeDebug, "OnCreateContextMenu()");
selectedLongClickItemPosition = ((AdapterView.AdapterContextMenuInfo)menuInfo).Position;
menu.SetHeaderTitle(Resource.String.PresentationsMenuTitle);
menu.Add(0, (int)PresentationsMenu.Start, 0, Resource.String.PresentationsMenuStart);
menu.Add(0, (int)PresentationsMenu.Create, 1, Resource.String.PresentationsMenuCreate);
menu.Add(0, (int)PresentationsMenu.Rename, 2, Resource.String.PresentationsMenuRename);
menu.Add(0, (int)PresentationsMenu.Delete, 3, Resource.String.PresentationsMenuDelete);
menu.Add(0, (int)PresentationsMenu.ShowFolder, 4, Resource.String.PresentationsMenuShowFolder);
}
示例13: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
{
base.OnCreateContextMenu(menu, v, menuInfo);
menu.Add(0, DeleteId + 1, 0, "Delete");
}
示例14: OnCreateContextMenu
public override void OnCreateContextMenu(IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo)
{
menu.Add("删除");
}
示例15: OnCreateMenu
public override void OnCreateMenu(IContextMenu menu, IContextMenuContextMenuInfo menuInfo)
{
menu.Add(0, MenuOpen, 0, Resource.String.menu_open);
if (App.Kp2a.GetDb().CanWrite)
{
menu.Add(0, MenuDelete, 0, Resource.String.menu_delete);
menu.Add(0, MenuMove, 0, Resource.String.menu_move);
if (_isSearchResult) {
menu.Add (0, MenuNavigate, 0, Resource.String.menu_navigate);
}
}
}