Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TabControl for .NET MAUI

Tags:

.net

android

maui

Is there a TabControl for .NET MAUI? I'm trying to use a part of my page to display multiple things. At the top there are general labels and buttons and below that I need different tabs to display data in different ways, or different events. The TabControl must not extend to the entire page. But I cannot find anything like a simple TabControl (from WPF or similar) for MAUI. Does it exist today? Or will I have to build it myself like I would have to do in HTML?

I'm not at all interested in any commercial or otherwise huge third-party libraries. I have my share of experiences with them and want to stay with the stock possibilities for a start.

like image 678
ygoe Avatar asked Apr 15 '26 20:04

ygoe


1 Answers

If you have a simple use case, then you can just use the TabBar that comes with the default MAUI Shell:

  1. Create a new MAUI app using the default template
  2. In your AppShell.xaml add the following:
<TabBar>
  <Tab>
    <ShellContent>
       ...
    </ShellContent>
  </Tab>
  <Tab>
    <ShellContent>
       ...
    </ShellContent>
  </Tab>
</TabBar>

More info: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/tabs

Alternatively, you can also use a TabbedPage: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/pages/tabbedpage

For more advanced scenarios, you'll need to use third party components. You could check out Uranium UI Kit for this: https://enisn-projects.io/docs/en/uranium/latest/themes/material/components/TabView

like image 67
Julian Avatar answered Apr 18 '26 09:04

Julian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!