How do I add tabs to a tab control?

Platform: .NET MAUI| Category: Controls

To add tabs to a tab control, you can use the Children property to add instances of Page or ContentPage.
XAML

<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:local="clr-namespace:MultiseletionSample"
            x:Class="MultiseletionSample.MainPage">
    <TabbedPage.Children>
        <local:NewPage1 Title="NewPage1" />
        <local:NewPage2 Title="NewPage2" />
        <!-- Other tabs -->
    </TabbedPage.Children>
</TabbedPage>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.