MenuItemCollection Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of MenuItem objects used in Shell.
public ref class MenuItemCollection sealed : System::Collections::Generic::ICollection<Microsoft::Maui::Controls::MenuItem ^>, System::Collections::Generic::IEnumerable<Microsoft::Maui::Controls::MenuItem ^>, System::Collections::Generic::IList<Microsoft::Maui::Controls::MenuItem ^>, System::Collections::Specialized::INotifyCollectionChanged
public sealed class MenuItemCollection : System.Collections.Generic.ICollection<Microsoft.Maui.Controls.MenuItem>, System.Collections.Generic.IEnumerable<Microsoft.Maui.Controls.MenuItem>, System.Collections.Generic.IList<Microsoft.Maui.Controls.MenuItem>, System.Collections.Specialized.INotifyCollectionChanged
type MenuItemCollection = class
interface seq<MenuItem>
interface IEnumerable
interface IList<MenuItem>
interface ICollection<MenuItem>
interface INotifyCollectionChanged
Public NotInheritable Class MenuItemCollection
Implements ICollection(Of MenuItem), IEnumerable(Of MenuItem), IList(Of MenuItem), INotifyCollectionChanged
- Inheritance
-
MenuItemCollection
- Implements
Constructors
| Name | Description |
|---|---|
| MenuItemCollection() | |
Properties
| Name | Description |
|---|---|
| Count |
Gets the number of menu items in the collection. |
| IsReadOnly |
Gets a value indicating whether the collection is read-only. |
| Item[Int32] | |
Methods
| Name | Description |
|---|---|
| Add(MenuItem) |
Adds a menu item to the collection. |
| Clear() |
Removes all menu items from the collection. |
| Contains(MenuItem) |
Determines whether the collection contains a specific menu item. |
| CopyTo(MenuItem[], Int32) |
Copies the menu items to an array, starting at the specified index. |
| GetEnumerator() |
Returns an enumerator that iterates through the collection. |
| IndexOf(MenuItem) |
Returns the index of the specified menu item. |
| Insert(Int32, MenuItem) |
Inserts a menu item at the specified index. |
| Remove(MenuItem) |
Removes the specified menu item from the collection. |
| RemoveAt(Int32) |
Removes the menu item at the specified index. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IEnumerable.GetEnumerator() | |
| INotifyCollectionChanged.CollectionChanged | |