Xamarin.Forms Guides | Samples

Xamarin.Forms.MenuItem Class

Class that presents a menu item and associates it with a command.

See Also: MenuItem


public class MenuItem : BaseMenuItem, IMenuItemController


XAML for Xamarin.Forms supports the following properties for the MenuItem class:


A binding to a command.


A parameter to pass to the command.


true or false, to indicate whether the command deletes an item in a list.


The text to display on the menu item.


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

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

See Also: BaseMenuItem

Public Constructors

Intitializes a new MenuItem instance.

Public Fields

static readonly
static readonly
CommandParameterPropertyBindableProperty. Identifies the command parameter bound property.
static readonly
CommandPropertyBindableProperty. Identifies the command bound property.
static readonly
IconPropertyBindableProperty. Identfies the icon bound property.
static readonly
IsDestructivePropertyBindableProperty. Identifies the IsDestructive bound property.
static readonly
IsEnabledPropertyBindableProperty. For internal use by the Xamarin.Forms platform.
static readonly
TextPropertyBindableProperty. Identifies the text bound property.

Public Properties

CommandICommand. Gets or sets the command that is run when the menu is clicked.
CommandParameterObject. Gets or sets the parameter that is passed to the command.
IconFileImageSource. Gets or sets the icon for the menu item.
IsDestructiveBoolean. Gets or sets a value that indicates whether or not the menu item removes its associated UI element.
IsEnabledBoolean. For internal use by the Xamarin.Forms platform.
IsEnabledPropertyNameString. For internal use by the Xamarin.Forms platform.
TextString. The text of the menu item.

Public Methods

For internal use by the Xamarin.Forms platform.
GetAccelerator(BindableObject) : Accelerator
SetAccelerator(BindableObject, Accelerator)

Protected Methods

When overriden by an app dev, implements behavior when the menu item is clicked.

Public Events

ClickedEvent that is raised when the menu item is clicked.