How do I create a tab control in .NET MAUI?

Platform: .NET MAUI| Category: Controls

You can create a tab control in .NET MAUI using the element in your XAML markup or by creating a new instance of the TabbedPage class in your C# code behind.
XAML:

<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:local="clr-namespace: TabbedPageSample"
            x:Class="TabbedPageSample.MainPage">
    
    <local:NewPage1/>
    <local:NewPage2/>
    <local:Remoteloctiondata/>
    <local:NewPage3/>
</TabbedPage>

Share with

Related FAQs

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

Please submit your question and answer.