chaosifier / TabView

TabView control for Xamarin.Forms.
MIT License
124 stars 32 forks source link

tabview:TabItem HeaderText CornerRadius #52

Closed lucioteles closed 3 years ago

lucioteles commented 3 years ago

Hi! I'm trying to add some corner radius to the TabItem. Does anybody know if it's possible and how to do it?

Thanks in advance..

chaosifier commented 3 years ago

You could to that using template properties in the new version. Here's an example for adding corner radius in tab headers :

<tabview:TabViewControl.TabHeaderItemTemplate>
    <DataTemplate>
        <Frame CornerRadius="5">
          <StackLayout>
            <Label
                Margin="0,10,0,5"
                FontSize="16"
                HorizontalTextAlignment="Center"
                Text="{Binding HeaderText}">
            </Label>
            <BoxView
                BackgroundColor="Green"
                HeightRequest="3"
                IsVisible="{Binding IsCurrent}" />
          <StackLayout>
        </Frame >
    </DataTemplate>
</tabview:TabViewControl.TabHeaderItemTemplate>