The All-New .NET MAUI Tabbed View Control Is Here | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (217)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (917)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (148)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (629)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (593)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
The All-New .NET MAUI Tab View Control Is Here

The All-New .NET MAUI Tabbed View Control Is Here

The .NET Multi-platform App UI (MAUI) is an evolution of Xamarin.Forms. It mainly focuses on single project development for different platforms such as Android, iOS, macOS, and Windows.

Syncfusion has shipped a set of cool .NET MAUI tools that includes Charts, Radial Gauge, and Tab View controls in the 2021 Volume 3 release. These controls are really fast, feature-rich, and flexible to use in your .NET MAUI applications.

In this blog, we will introduce the .NET MAUI Tabbed View control along with code examples.

.NET MAUI Tabbed View (Preview)

The advanced .NET  MAUI Tabbed View is a simple and intuitive interface for tab navigation. You can use it in both mobile and desktop applications, wherever you want your users to explore and switch between different tabs.

Tab View overview

  • Optimizes screen space usage when an application requires complex and huge layouts.
  • Contains a set of tab items that present different content in the same space.
  • Shows only one tab item at a time to be accessed by the user. The user taps another tab to make its content visible on the screen.

Tab width mode

The .NET MAUI Tabbed View provides two width options: default and size to content.  These options determine how to calculate the width of the tabs on the tab bar when it is populated.

Default

In the default option, the width of all the tabs is equally divided based on the width of the tab bar. This enables a fixed tab bar that does not allow tab scrolling regardless of the number of tabs.

<syncfusion:SfTabView TabWidthMode="Default" />
Default Tab Width Mode
Default Tab Width Mode

Size to content

You can use this option when you need to set the width of a tab so that it fits the text or image that it contains. This option enables tab scrolling when the arrangement of the tabs and their width exceeds the tab bar’s width.

<syncfusion:SfTabView TabWidthMode="SizeToContent" />
Size To Content Tab Width Mode
Size To Content Tab Width Mode

Tab image position

The .NET MAUI Tabbed View provides four options that determine how an image in a tab aligns relative to the tab’s text. The available options are top, bottom, left, and right.

Top

The top option places the image above the text.

<syncfusion:SfTabItem ImagePosition="Top"/>
Placing Tab Image at the Top
Placing the Tab Image at the Top

Bottom

The bottom option places the image below the text.

<syncfusion:SfTabItem ImagePosition="Bottom"/>
Placing Tab Image at the Bottom
Placing the Tab Image at the Bottom

Left

The left option places the image before the text.

<syncfusion:SfTabItem ImagePosition="Left"/>
Placing Tab Image at the Left
Placing the Tab Image at the Left

Right

The right option places the image after the text.

<syncfusion:SfTabItem ImagePosition="Right"/>
Placing Tab Image at the Right
Placing the Tab Image at the Right

Selection indicator placement

The .NET MAUI Tabbed View provides three options that determine how the selection indicator aligns relative to the tab header item content. The available options are top, bottom, and fill.

Top

The selection indicator is places at the top of the selected tab.

<syncfusion:SfTabView IndicatorPlacement="Top" />
Placing the Selection Indicator at the Top
Placing the Selection Indicator at the Top

Bottom

The selection indicator is placed at the bottom of the selected tab.

<syncfusion:SfTabView IndicatorPlacement="Bottom" />
Placing Selection Indicator at the Bottom
Placing the Selection Indicator at the Bottom

Fill

The selection indicator fills the selected tab.

<syncfusion:SfTabView IndicatorPlacement="Fill" />
Fill Selection Indicator on the Selected Tab
Fill Selection Indicator on the Selected Tab

Tab bar placement

The .NET MAUI Tabbed View provides two options that determine how the tab bar aligns relative to the tab content. The available options are top and bottom.

Top

The tab bar will be placed above the content region of the Tab View control.

<syncfusion:SfTabView TabBarPlacement="Top" />
Placing the Tab Bar at the Top of the Tab Content
Placing the Tab Bar at the Top of the Tab Content

Bottom

The tab bar will be placed below the content region of the Tab View control.

<syncfusion:SfTabView TabBarPlacement="Bottom" />
Placing the Tab Bar at the Bottom of the Tab Content
Placing the Tab Bar at the Bottom of the Tab Content

Nested tabs

This support allows users to have a nested tab view. You can also configure a tab view within another tab view through its Items property.

<syncfusion:SfTabView>
<syncfusion:SfTabItem Header="Item 1">
<syncfusion:SfTabView>
<syncfusion:SfTabItem Header="Item 1 SubItem 1"/>
<syncfusion:SfTabItem Header="Item 1 SubItem 2"/>
</syncfusion:SfTabView>
</syncfusion:SfTabItem>
<syncfusion:SfTabItem Header="Item 2">
<syncfusion:SfTabView>
<syncfusion:SfTabItem Header="Item 2 SubItem 1"/>
<syncfusion:SfTabItem Header="Item 2 SubItem 2"/>
</syncfusion:SfTabView>
</syncfusion:SfTabItem>
</syncfusion:SfTabView>

Ripple animation

The built-in ripple animation matches the Material theme. This animation also provides a better taping experience to the user.

Color and font customization

You can easily customize all fonts and theirs colors with simple APIs.

Tab Bar with Customized Font and Colors
Tab Bar with Customized Font and Colors

Visual state manager

Use the visual state manager to make changes to the .NET MAUI Tabbed View item properties based on the visual states set in the code. The applicable visual states are selected, normal, enable and disable.

<Style TargetType="TabView:SfTabItem">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup>
<VisualState x:Name="Selected" >
<VisualState.Setters>
<Setter Property="TextColor" Value="Red" />
<Setter Property="ImagePosition" Value="Top" />
<Setter Property="FontSize" Value="16" />
<Setter Property="FontAttributes" Value="Bold" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="TextColor" Value="Black" />
<Setter Property="ImagePosition" Value="Left" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontAttributes" Value="Italic" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
Designing Tab Items with Visual State Manager
Designing Tab Items with Visual State Manager

Conclusion

Thanks for reading! In this blog post, we have gone through the features of .NET MAUI Tabbed View control rolled out in the 2021 Volume 3 release. Also, we are planning to provide several more features like an action button, overflow button, swipe navigation, and more. You can download the assemblies from NuGet to evaluate this new control. Check out our Release Notes and What’s New pages for more details.

We are also planning to deliver more .NET MAUI controls to replace our existing Syncfusion Xamarin.Forms controls. You can expect them in our upcoming releases!

Do you need any other features from this .NET MAUI Tabbed View? Please comment below or mention them in our support forumDirect-Trac, or feedback portal. We are always happy to assist you!

Test Flight
App Center Badge
Google Play Store Badge
Microsoft Badge
Github Store Badge

Related blogs

Tags:

Share this post:

Comments (2)

Looks beautiful. I would also need badges on a tab in my application. It would be very useful if you can implement it here.

Selva Ganapathy Kathiresan
Selva Ganapathy Kathiresan

Hi JAN POLENKO,

Thank you for your interest in Syncfusion products. We already consider the badge on tab header feature, you can expect this feature in our Vol 4 2021 release

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed