Skip to content

SyncfusionExamples/How-to-customize-the-border-for-the-tab-header-area-in-.NET-MAUI-Tab-View

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

How to customize the border for the tab header area in .NET MAUI Tab View

This article explains how to customize the border for the tab header area in .NET MAUI Tab View. You can achieve this by using the following built-in properties of the SfTabView:

  • TabBarBorderColor - sets the border color
  • TabBarBorderThickness - sets the border thickness
  • TabBarCornerRadius - sets the corner radius of the tab bar's border

MainPage.Xaml

<tabView:SfTabView TabBarBorderColor="#2196F3" TabBarBorderThickness="3" TabBarCornerRadius="24"
                   IndicatorBackground="#E3F2FD" IndicatorPlacement="Fill" 
                   TabBarPlacement="Bottom">
   <tabView:TabItemCollection>
       <tabView:SfTabItem Header="Library">
           <Label Text="Library Content" HorizontalOptions="Center" VerticalOptions="Center"/>
       </tabView:SfTabItem>
       <tabView:SfTabItem Header="Browse">
           <Label Text="Browse Content" HorizontalOptions="Center" VerticalOptions="Center"/>
       </tabView:SfTabItem>
       <tabView:SfTabItem Header="Playlists">
           <Label Text="Playlist Content" HorizontalOptions="Center" VerticalOptions="Center"/>
       </tabView:SfTabItem>
   </tabView:TabItemCollection>
</tabView:SfTabView>

MainPage.Xaml.cs

SfTabView tabView = new SfTabView
{
   TabBarBorderColor = Color.FromArgb("#2196F3"),
   TabBarBorderThickness = 3,
   TabBarCornerRadius = 24,
   IndicatorBackground = Color.FromArgb("#E3F2FD"),
   IndicatorPlacement = TabIndicatorPlacement.Fill,
   TabBarPlacement = TabBarPlacement.Bottom
};

Output:

tabbarborder-kb.gif

About

This branch contains how to customize the border for the tab header area in .NET MAUI Tab View.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages