Class

MobileToolbar


Description

A toolbar can be displayed in a screen as a Toolbar or Navigation Bar.

Properties

Name

Type

Read-Only

Shared

Count

Integer

Methods

Name

Parameters

Returns

Shared

AddButton

button As MobileToolbarButton

AddButtonAt

index As Integer, button As MobileToolbarButton

ButtonAt

index As Integer

MobileToolbarButton

RemoveAllButtons

RemoveButtonAt

index As Integer

Property descriptions


MobileToolbar.Count

Count As Integer

The number of buttons on the toolbar.

This property is read-only.

If Count = 0 then no toolbar is displayed.

Get the count of buttons on a Screen:

Var buttonCount As Integer = Toolbar.Count

Method descriptions


MobileToolbar.AddButton

AddButton(button As MobileToolbarButton)

Adds the button to the end of the toolbar.

Add the Camera button to the right Navigation Bar:

Var cameraButton As New MobileToolbarButton(MobileToolbarButton.Types.Camera)
RightNavigationToolbar.AddButton(cameraButton)

MobileToolbar.AddButtonAt

AddButtonAt(index As Integer, button As MobileToolbarButton)

Adds the button to the toolbar at the index passed.

Add a button at the first position of the toolbar:

Toolbar.AddButtonAt(0, New MobileToolbarButton(MobileToolbarButton.Types.Camera))

MobileToolbar.ButtonAt

ButtonAt(index As Integer) As MobileToolbarButton

Gets the button on the toolbar at the specified index.

Get the first button on the toolbar:

Var button As MobileToolbarButton
button = Toolbar.ButtonAt(0)

Change the Caption of the last button on the toolbar:

Toolbar.ButtonAt(Toolbar.Count - 1).Caption = "New"

MobileToolbar.RemoveAllButtons

RemoveAllButtons

Removes all the buttons from the bar.

Remove all the buttons from the toolbar:

Toolbar.RemoveAllButtons

MobileToolbar.RemoveButtonAt

RemoveButtonAt(index As Integer)

Removes the button at the specified index from the toolbar.

Remove the first button from the toolbar:

Toolbar.RemoveButtonAt(0)

Notes

Accessed using the LeftNavigationToolbar, RightNavigationToolbar and Toolbar properties of the MobileScreen.

Compatibility

Mobile projects on all supported mobile operating systems.

See also

Object parent class; MobileScreen, MobileToolbarButton classes