TabItem¶
When assigning a rule to a property of TabItem, the rule will be passed an instance of the following proxy class as an argument:
TabItem Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| Caption | string |
No | |
| Image | Image | No | |
| OnPress | ActionOrRule | No | |
| PageMetadata | multiple | No | |
| PageToOpen | Page | No | |
| ResetIfPressedWhenActive | boolean |
No | false |
| _Name | string |
Yes | |
| _Type | const |
Yes |
Caption¶
- type:
string
Image¶
Image will display together with Caption if specified. Specific for iOS, an overlay mask would be applied on top of the image to distinguish active and inactive tab items. The overlay mask only works well on image with transparent background, otherwise the image would be displayed as monotone square icon.
- type: Image
OnPress¶
Action/Rule to be triggered when the tab item is pressed.
- type: ActionOrRule
- Formatter and Binding are not supported
PageMetadata¶
Only supported on Tabs, not supported on BottomNavigation. Page's metadata will be rendered, when the PageMetadata
is specified it will take preference over the PageToOpen.
The properties defined in Page are also applicable to it. For each tab item, please ensure
either PageToOpen or PageMetadata is specified.
- type: multiple
Either one of:
stringobject
PageToOpen¶
Page to be rendered as the content of the tab item, references a .page file. For each tab item, please ensure either
PageToOpen or PageMetadata is specified.
- type: Page
ResetIfPressedWhenActive¶
Flag to determine whether need to reset to original tab page if the tab item is pressed again when it is the selected tab item.
- type:
boolean - default:
false
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be:
"Control.Type.TabItem"