TabViewItem
TabViewItem
is the control used to populate the TabView. It displays the header of the tab item and the corresponding content. TabViewItem
exposes the following properties:
-
HeaderText
(string
)—Defines a simple text for the TabView item. -
ImageSource
(ImageSource
)—Specifies the source of the image icon in the header item. -
IsSelected
—Indicated whether the item is selected. -
IsEnabled
—Defines whether the TabView Item is enabled/disabled. By defaultIsEnabled
isTrue
. -
IsVisible
—Specifies whether the TabView Item is visible/hidden. -
Content
(Microsoft.Maui.Controls.View
)—Defines the content of the TabView Item.
Displaying TabViewItem
To display a TabViewItem you can add it in the Items
collection of TabView
.
Example
<telerik:RadTabView x:Name="tabView">
<telerik:TabViewItem HeaderText="Home" />
<telerik:TabViewItem HeaderText="Folder" />
<telerik:TabViewItem HeaderText="View" />
</telerik:RadTabView>
Defining Content
You can define the content of a TabViewItem via its Content
property. It is of type Microsoft.Maui.Controls.View
, so you can use any UI element that implements the View class.
Example
<telerik:RadTabView x:Name="tabView" AutomationId="tabView">
<telerik:TabViewItem HeaderText="Home">
<Label Margin="10" Text="This is the content of the Home tab" />
</telerik:TabViewItem>
<telerik:TabViewItem HeaderText="Folder">
<Label Margin="10" Text="This is the content of the Folder tab" />
</telerik:TabViewItem>
<telerik:TabViewItem HeaderText="View">
<Label Margin="10" Text="This is the content of the View tab" />
</telerik:TabViewItem>
</telerik:RadTabView>
The TabView control displays only the content of the selected item.