Xamarin.Forms Guides | Samples

Xamarin.Forms.ToolbarItem Class

An item in a toolbar or displayed on a Page.

See Also: ToolbarItem


public class ToolbarItem : MenuItem


Any changes made to the properties of the toolbar item after it has been added will be ignored.

Note: Windows Phone ApplicationBarButtons and MenuItems always display an associated text. Therefore, when developing for Windows Phone, application devs should provide a value for the ToolbarItem.Text property. Otherwise, the file name of the icon image will be dixplayed as the text of the ToolbarItem. (For example, the user might see "menu.png" in the user interface.)


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

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

See Also: MenuItem

Public Constructors

Constructs and initializes a new instance of the ToolbarItem class.
Constructs and initializes a new instance of the ToolbarItem class.

Public Fields

static readonly
CommandParameterPropertyBindableProperty. Backing store for the ToolBarItem.ComandParameter property.
static readonly
CommandPropertyBindableProperty. Backing store for the ToolBarItem.Comand property.

Public Properties

CommandICommand. Gets or sets the ICommand to be invoked on activation.
CommandParameterObject. Gets or sets the parameter to pass to the ICommand that is invoked on activation.
IconFileImageSource. Gets or sets a string that identifies the image that is displayed on this ToolbarItem element.
NameString. Gets or sets the name of the ToolbarItem.
OrderToolbarItemOrder. Gets or sets a value that indicates on which of the primary, secondary, or default toolbar surfaces to display this ToolbarItem element.
PriorityInt32. Gets or sets the priority of this ToolbarItem element.

Public Events

ActivatedRaised when the ToolbarItem is touched or clicked.

Explicitly Implemented Interface Members

ToolbarItem$IElement.ParentElement. Gets or sets the toolbar to which this ToolbarItem element belongs.
ToolbarItem$IElement.XamlParentWeakReference<Element>. Gets or sets a weak reference to the parent of this ToolbarItem object.