This is a migrated thread and some comments may be shown as answers.

tab icon above header text

1 Answer 33 Views
TabView
This is a migrated thread and some comments may be shown as answers.
ahmed
Top achievements
Rank 1
ahmed asked on 05 Jan 2020, 03:02 AM
I need to add icon above tab text how to do that in xaml ?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 06 Jan 2020, 11:07 AM

Hello Ahmed,

TabViewItem provides Header property which should be set to TabViewHeaderItem object and in it you can add content of your choice.  Here is a quick example on how you can use it:

<telerikPrimitives:TabViewItem>
	<telerikPrimitives:TabViewItem.Header>
		<telerikPrimitives:TabViewHeaderItem>
			<telerikPrimitives:TabViewHeaderItem.Content>
				<!-- you can add custom content here -->
				<StackLayout Margin="5,0,0,0" Orientation="Horizontal">
					<ContentView BackgroundColor="#CA5100"
								 HeightRequest="10"
								 VerticalOptions="Center"
								 WidthRequest="10" />
					<Label Text="Folder" />
				</StackLayout>
			</telerikPrimitives:TabViewHeaderItem.Content>
		</telerikPrimitives:TabViewHeaderItem>
	</telerikPrimitives:TabViewItem.Header>
	<telerikPrimitives:TabViewItem.Content>
		<Label Margin="10" Text="This is the content of the tab" />
	</telerikPrimitives:TabViewItem.Content>
</telerikPrimitives:TabViewItem>

I hope this would be of help.

Regards,
Yana
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TabView
Asked by
ahmed
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or