Class Menu
Represents the base functionality for all menus.
public abstract class Menu : ItemContainerElement<MenuItem>, IBaseObjectWithAttr, IDisposableObject, IComponent, IDisposable, IMenuProperties, ICollectionObserver<object>, INotifyPropertyChanged, IBaseObjectWithId, IBaseObject
- Inheritance
-
Menu
- Implements
- Derived
Constructors
Properties
- FirstVisibleItem
Gets the first visible menu item in the collection, or null if no items are visible.
- InUpdates
Gets a value indicating whether the object is currently in an update block.
- LastVisibleItem
Gets the last visible menu item in the collection of items.
Methods
- Add(string, Action)
Creates and adds new item to Items collection.
- AddDisabledText(string)
Adds a disabled menu item with the specified text to the menu.
- AddSeparator()
Adds a separator item to the Items collection.
- BeginUpdate()
Begins an update block, incrementing the update counter.
- CheckSingleItem(MenuItem?)
Checks the specified item and unchecks all other sibling menu items.
- CheckSingleItemWithTag(object?, FindItemFlags)
Checks the menu item whose
Tagmatches the specified value, and unchecks all others.
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.
- DoInsideUpdate(Action)
Executes
actionbetween calls to BeginUpdate() and EndUpdate().
- EndUpdate()
Ends an update block, decrementing the update counter.
- ForEachItem(Action<MenuItem>, bool)
Performs some action for the each element in Items.
- MenuFromId(ObjectUniqueId)
Retrieves a menu by its unique identifier.
- MenuFromStringId(string?)
Retrieves a Menu instance corresponding to the specified string identifier.
- OnItemChanged(Menu, MenuChangeEventArgs)
Invoked when an item in the menu is changed.
- OnItemInserted(object?, int, MenuItem)
Invoked after an item has been inserted into the collection.
- OnItemRemoved(object?, int, MenuItem)
Invoked when an item is removed from the collection.
- RaiseItemChanged(Menu, MenuChangeEventArgs)
Notifies that a change has occurred to the specified child item.
- RaiseItemChanged(Menu, MenuChangeKind)
Raises an event to notify that a menu item has changed.
- UncheckItems()
Unchecks all child menu items by setting their
Checkedproperty tofalse.
Events
- ItemChanged
Occurs when an item is changed.