当前位置: 首页>>代码示例>>C#>>正文


C# IContextMenu.Add方法代码示例

本文整理汇总了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");
		}
开发者ID:adbk,项目名称:spikes,代码行数:7,代码来源:ContextMenus.cs

示例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");
        }
开发者ID:Redth,项目名称:FlamedTVLauncher,代码行数:7,代码来源:MainActivity.cs

示例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");
            }
开发者ID:vkheleli,项目名称:monodroid-samples-master,代码行数:7,代码来源:FragmentContextMenuSupport.cs

示例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, "Удалить");
 }
开发者ID:pafik13,项目名称:PresenterPlanner,代码行数:7,代码来源:DoctorsList.cs

示例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);
     }
 }
开发者ID:M-Zuber,项目名称:MoneyManager,代码行数:9,代码来源:CategoryListActivity.cs

示例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());
        }
开发者ID:mgroves,项目名称:MonodroidStockPortfolio,代码行数:11,代码来源:MainActivity.cs

示例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);
        }
开发者ID:vkheleli,项目名称:monodroid-samples-master,代码行数:8,代码来源:NotesListActivity.cs

示例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");

		}
开发者ID:seipekm,项目名称:MonoBrick-Communication-Software,代码行数:9,代码来源:ClientsActivity.cs

示例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]);
         }
     }
 }
开发者ID:ChemicalRocketeer,项目名称:RollifyXamarin,代码行数:11,代码来源:FormulaListFragment.cs

示例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]);
            }
        }
开发者ID:piotreqm,项目名称:JedzmyRazem,代码行数:12,代码来源:MyFriendsActivity.cs

示例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());
            }
        }
开发者ID:mgroves,项目名称:MonodroidStockPortfolio,代码行数:16,代码来源:PortfolioActivity.cs

示例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);
        }
开发者ID:00091701,项目名称:FullscreenPresentation-Mono,代码行数:14,代码来源:EditActivity.cs

示例13: OnCreateContextMenu

        public override void OnCreateContextMenu(IContextMenu menu, View v, IContextMenuContextMenuInfo menuInfo)
        {
            base.OnCreateContextMenu(menu, v, menuInfo);

            menu.Add(0, DeleteId + 1, 0, "Delete");
        }
开发者ID:PablusVinii,项目名称:SuperNWTBible,代码行数:6,代码来源:FavoritesFragment.cs

示例14: OnCreateContextMenu

 public override void OnCreateContextMenu(IContextMenu menu, View view, IContextMenuContextMenuInfo menuInfo)
 {
     menu.Add("删除");
 }
开发者ID:codesharp,项目名称:cooper,代码行数:4,代码来源:MainActivity.cs

示例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);
                }

            }
        }
开发者ID:pythe,项目名称:wristpass,代码行数:14,代码来源:PwEntryView.cs


注:本文中的IContextMenu.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。