8.6 Released with 🥽 visionOS support and more!
Check it out
SegmentedBar
Represents a UI SegmentedBar component.

Summary

Constructors

constructor

Properties

items
selectedBackgroundColor
selectedIndex
selectedIndexChangedEvent
154 properties inherited from View
Click to expand

Methods

_addArrayFromBuilder
_addChildFromBuilder
on
111 methods inherited from View
Click to expand

Constructors

constructor

new SegmentedBar(): SegmentedBar

Properties

items

Gets or sets the items of the SegmentedBar.

selectedBackgroundColor

selectedBackgroundColor: Color
Gets or sets the selected background color of the SegmentedBar component.

selectedIndex

selectedIndex: number
Gets or sets the selected index of the SegmentedBar component.

selectedIndexChangedEvent

Static
selectedIndexChangedEvent: string
String value used when hooking to the selectedIndexChanged event.

Methods

_addArrayFromBuilder

_addArrayFromBuilder(name: string, value: any[]): void
Parameter Default Description
name
string

value
any[]

Returns void

_addChildFromBuilder

_addChildFromBuilder(name: string, value: any): void
Called for every child element declared in xml.
Parameter Default Description
name
string

Name of the element.

value
any

Value of the element.

Returns void

on

on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter Default Description
eventNames
string

String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").

callback
(data: EventData) => void

Callback function which will be executed when event is raised.

thisArg
any

An optional parameter which will be used as `this` context for callback execution.

Returns void
on(
  event: "selectedIndexChanged",
  callback: (args: SelectedIndexChangedEventData) => void,
  thisArg?: any
): void
Raised when the selected index changes.
Parameter Default Description
event
"selectedIndexChanged"

callback
(args: SelectedIndexChangedEventData) => void

thisArg
any

Returns void
Previous
SearchBar