6 instantiations of MenuItem
System.Web.Mobile (2)
UI\MobileControls\Design\StylesEditorDialog.cs (1)
165
_cntxtMenuItem = new
MenuItem
();
UI\MobileControls\Design\Util\EditableTreeList.cs (1)
61
this.CntxtMenuItem = new System.Windows.Forms.
MenuItem
();
System.Windows.Forms (4)
winforms\Managed\System\WinForms\Menu.cs (3)
792
MenuItem item = new
MenuItem
(caption);
803
MenuItem item = new
MenuItem
(caption, onClick);
814
MenuItem item = new
MenuItem
(caption, items);
winforms\Managed\System\WinForms\MenuItem.cs (1)
831
MenuItem newItem = new
MenuItem
();
152 references to MenuItem
System.Web.Mobile (2)
UI\MobileControls\Design\StylesEditorDialog.cs (1)
65
private
MenuItem
_cntxtMenuItem;
UI\MobileControls\Design\Util\EditableTreeList.cs (1)
47
internal System.Windows.Forms.
MenuItem
CntxtMenuItem;
System.Windows.Forms (150)
winforms\Managed\System\WinForms\ContextMenu.cs (1)
48
public ContextMenu(
MenuItem
[] menuItems)
winforms\Managed\System\WinForms\Control.cs (14)
6673
private
MenuItem
GetMenuItemFromHandleId(IntPtr hmenu, int item) {
6674
MenuItem
mi = null;
6680
MenuItem
found = null;
6685
if (parent != null && parent is
MenuItem
) {
6686
found = (
MenuItem
)parent;
6699
if (reference != null && reference is
MenuItem
.MenuItemData) {
6700
mi = ((
MenuItem
.MenuItemData)reference).baseItem;
12942
MenuItem
menuItem =
MenuItem
.GetMenuItemFromItemData(dis.itemData);
13192
MenuItem
menuItem =
MenuItem
.GetMenuItemFromItemData(mis.itemData);
13228
MenuItem
mi = null;
13237
if (reference != null && reference is
MenuItem
.MenuItemData) {
13238
mi = ((
MenuItem
.MenuItemData)reference).baseItem;
winforms\Managed\System\WinForms\MainMenu.cs (1)
56
public MainMenu(
MenuItem
[] items)
winforms\Managed\System\WinForms\Menu.cs (65)
54
internal
MenuItem
[] items;
67
protected Menu(
MenuItem
[] items) {
121
public
MenuItem
MdiListItem {
124
MenuItem
item = items[i];
236
MenuItem
[] newItems = null;
239
newItems = new
MenuItem
[count];
298
MenuItem
item = items[--_itemCount];
326
public
MenuItem
FindMenuItem(int type, IntPtr value) {
332
private
MenuItem
FindMenuItemInternal(int type, IntPtr value) {
334
MenuItem
item = items[i];
403
foreach (
MenuItem
item in MenuItems) {
420
if (!(menuT is
MenuItem
)) return null;
421
menuT = ((
MenuItem
)menuT).Menu;
438
if (!(menuT is
MenuItem
)) return null;
439
menuT = ((
MenuItem
)menuT).Menu;
474
MenuItem
mi = items[itemIndex];
494
private delegate bool MenuItemKeyComparer(
MenuItem
mi, char key);
507
MenuItem
item;
508
MenuItem
itemDst;
571
MenuItem
item = FindMenuItemInternal(FindHandle, handle);
589
MenuItem
item = FindMenuItemInternal(FindShortcut, (IntPtr)(int)keyData);
602
MenuItem
mi = items[i];
661
private bool CheckOwnerDrawItemWithMnemonic(
MenuItem
mi, char key) {
667
private bool CheckOwnerDrawItemNoMnemonic(
MenuItem
mi, char key) {
699
public virtual
MenuItem
this[int index] {
723
public virtual
MenuItem
this[string key] {
791
public virtual
MenuItem
Add(string caption) {
792
MenuItem
item = new MenuItem(caption);
802
public virtual
MenuItem
Add(string caption, EventHandler onClick) {
803
MenuItem
item = new MenuItem(caption, onClick);
813
public virtual
MenuItem
Add(string caption,
MenuItem
[] items) {
814
MenuItem
item = new MenuItem(caption, items);
825
public virtual int Add(
MenuItem
item) {
836
public virtual int Add(int index,
MenuItem
item) {
843
if (owner is
MenuItem
) {
844
MenuItem
parent = (
MenuItem
)owner;
849
if (parent.Parent is
MenuItem
)
850
parent = (
MenuItem
)parent.Parent;
872
MenuItem
[] newItems = new
MenuItem
[owner.ItemCount < 2? 4: owner.ItemCount * 2];
881
if (owner is
MenuItem
) {
882
((
MenuItem
) owner).ItemsChanged(CHANGE_ITEMADDED, item);
892
public virtual void AddRange(
MenuItem
[] items) {
896
foreach(
MenuItem
item in items) {
904
if (value is
MenuItem
) {
905
return Add((
MenuItem
)value);
916
public bool Contains(
MenuItem
value) {
923
if (value is
MenuItem
) {
924
return Contains((
MenuItem
)value);
945
public
MenuItem
[] Find(string key, bool searchAllChildren) {
955
MenuItem
[] stronglyTypedfoundMenuItems = new
MenuItem
[foundMenuItems.Count];
1006
public int IndexOf(
MenuItem
value) {
1018
if (value is
MenuItem
) {
1019
return IndexOf((
MenuItem
)value);
1060
if (value is
MenuItem
) {
1061
Add(index, (
MenuItem
)value);
1095
if (owner is
MenuItem
) {
1096
((
MenuItem
)(owner)).UpdateMenuItem(true);
1129
MenuItem
item = owner.items[index];
1160
public virtual void Remove(
MenuItem
item) {
1169
if (value is
MenuItem
) {
1170
Remove((
MenuItem
)value);
winforms\Managed\System\WinForms\MenuItem.cs (56)
64
private
MenuItem
nextLinkedItem; // Next item linked to the same MenuItemData.
79
/// Initializes a <see cref='System.Windows.Forms.
MenuItem
'/> with
90
/// cref='System.Windows.Forms.
MenuItem
'/>
131
public MenuItem(string text,
MenuItem
[] items) : this(MenuMerge.Add, 0, 0, text, null, null, null, items) {
155
EventHandler onSelect,
MenuItem
[] items)
384
if (menu != null && !(menu is
MenuItem
)) {
809
private static void CleanListItems(
MenuItem
senderMenu) {
814
MenuItem
item = senderMenu.MenuItems[i];
830
public virtual
MenuItem
CloneMenu() {
831
MenuItem
newItem = new MenuItem();
844
protected void CloneMenu(
MenuItem
itemSrc) {
966
/// Disposes the <see cref='System.Windows.Forms.
MenuItem
'/>.
992
internal static
MenuItem
GetMenuItemFromUniqueID(uint uniqueID) {
995
return (
MenuItem
)weakRef.Target;
1007
internal static
MenuItem
GetMenuItemFromItemData(IntPtr itemData) {
1094
internal void ItemsChanged(int change,
MenuItem
item) {
1103
MenuItem
currentMenuItem = this.data.firstItem;
1106
MenuItem
newItem = item.CloneMenu();
1143
MenuItem
senderMenu = this;
1158
MenuItem
sep = (
MenuItem
)Activator.CreateInstance(this.GetType());
1185
MenuItem
windowItem = (
MenuItem
)Activator.CreateInstance(this.GetType());
1206
MenuItem
moreWindows = (
MenuItem
)Activator.CreateInstance(this.GetType());
1223
/// cref='System.Windows.Forms.
MenuItem
'/>.
1226
public virtual
MenuItem
MergeMenu() {
1229
MenuItem
newItem = (
MenuItem
)Activator.CreateInstance(this.GetType());
1242
public void MergeMenu(
MenuItem
itemSrc) {
1250
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.Click'/>
1269
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.DrawItem'/>
1285
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.MeasureItem'/>
1302
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.Popup'/>
1338
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.Select'/>
1377
/// Raises the <see cref='System.Windows.Forms.
MenuItem
.Select'/>
1386
if (menu is
MenuItem
) {
1387
MenuItem
parent = (
MenuItem
)menu;
1549
internal
MenuItem
baseItem;
1550
internal
MenuItem
firstItem;
1569
internal MenuItemData(
MenuItem
baseItem, MenuMerge mergeType, int mergeOrder, Shortcut shortcut, bool showShortcut,
1604
for (
MenuItem
item = firstItem; item != null; item = item.nextLinkedItem) {
1652
return(state &
MenuItem
.STATE_HIDDEN) == 0;
1655
if (((state &
MenuItem
.STATE_HIDDEN) == 0) != value) {
1656
state = value? state & ~
MenuItem
.STATE_HIDDEN: state |
MenuItem
.STATE_HIDDEN;
1672
internal void AddItem(
MenuItem
item) {
1700
for (
MenuItem
item = firstItem; item != null; item = item.nextLinkedItem) {
1706
internal void RemoveItem(
MenuItem
item) {
1713
MenuItem
itemT;
1770
for (
MenuItem
item = firstItem; item != null; item = item.nextLinkedItem) {
1783
private
MenuItem
parent;
1786
public MdiListFormData(
MenuItem
parentItem, int boundFormIndex) {
1818
private
MenuItem
parent;
1820
public MdiListMoreWindowsData(
MenuItem
parent) {
winforms\Managed\System\WinForms\MenuMerge.cs (8)
20
/// Specifies the behavior of a <see cref='System.Windows.Forms.
MenuItem
'/> when it is merged with items in another menu.
28
/// The <see cref='System.Windows.Forms.
MenuItem
'/> is added to
29
/// the existing <see cref='System.Windows.Forms.
MenuItem
'/> objects in a merged menu.
37
/// The <see cref='System.Windows.Forms.
MenuItem
'/> replaces the
38
/// existing <see cref='System.Windows.Forms.
MenuItem
'/>
49
/// Subitems of this <see cref='System.Windows.Forms.
MenuItem
'/> are merged with
50
/// those of existing <see cref='System.Windows.Forms.
MenuItem
'/> objects
59
/// The <see cref='System.Windows.Forms.
MenuItem
'/> is not included in a merged menu.
winforms\Managed\System\WinForms\NotifyIcon.cs (4)
959
MenuItem
menuItem =
MenuItem
.GetMenuItemFromItemData(mis.itemData);
975
MenuItem
menuItem =
MenuItem
.GetMenuItemFromItemData(dis.itemData);
winforms\Managed\System\WinForms\RichTextBox.cs (1)
4052
menu = ((
MenuItem
) menu).Menu;