Class
MobileToolbar
Toolbar
Description
A toolbar can be displayed in a screen as a Toolbar or Navigation Bar.
Properties
Name |
Type |
Read-Only |
Shared |
|---|---|---|---|
✓ |
|||
Methods
Name |
Parameters |
Returns |
Shared |
|---|---|---|---|
button As MobileToolbarButton |
|||
index As Integer, button As MobileToolbarButton |
|||
index As Integer |
|||
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
MobileToolbar.OverflowIcon
OverflowIcon As Picture
The overflow icon of the toolbar.
Important
This property is currently supported for Android only.
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
Project Types |
Mobile |
Operating Systems |
All |
See also
Object parent class; MobileScreen, MobileToolbarButton classes