Xamarin.Forms Guides | Samples

Xamarin.Forms.Menu Class

Represents an application menu on platforms that support them.

See Also: Menu

Syntax

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 2.0.0.0

The members of Xamarin.Forms.Menu are listed below.

See Also: BaseMenuItem

Public Constructors

Creates a new menu with default values.

Public Properties

[read-only]
CountInt32. Gets the number of menus that are contained in this menu.
[read-only]
IsReadOnlyBoolean. Returns false.
default property
Item(Int32)Menu. Gets or sets the menu at index.
[read-only]
ItemsSystem.Collections.ObjectModel.ObservableCollection<MenuItem>. Gets the collection of menus that belong to this menu.
TextString. Gets or sets the text of the menu.

Public Methods

Add(Menu)
Add item to the end of the collection of menus in this menu.
Clear()
Clears all the menus from this menu.
Contains(Menu) : Boolean
Returns true if item is contained in the top-level collection of menus that belong to this menu. Otherwise, returns false.
CopyTo(Menu[], Int32)
Copies array into this menu's collection of menus, beginning at arrayIndex.
GetEnumerator() : IEnumerator<Menu>
Returns an enumerator for the menus that are contained in this menu.
IndexOf(Menu) : Int32
Returns the index of item.
Insert(Int32, Menu)
Inserts item into this menu's collection of items at index.
Invalidate()
Visually displays the menu as invalid.
Remove(Menu) : Boolean
Removes item.
RemoveAt(Int32)
Removes the menu at index.

Explicitly Implemented Interface Members

Menu$IEnumerable.GetEnumeratorFor internal use only.