6 Answers, 1 is accepted
0
Hello Srinivasa,
If you want to have images, icons or other content in the RadTabItem header then you have to set the Header property:
1. In a simple scenario with RadTabItem you can set the header as follows :
<telerik:RadTabControl>
<telerik:RadTabItem >
<telerik:RadTabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="/Examples/Common/Images/TabControl/Report/Financial.png"
Height="16" Width="16" />
<TextBlock Text="Financial Report" Margin="3,0,0,0" />
</StackPanel>
</telerik:RadTabItem.Header>
</telerik:RadTabItem>
</telerik:RadTabControl>
2.If you use more complex scenario with DataBinding:
http://demos.telerik.com/silverlight/default.aspx#TabControl/HeaderContent
I hope this answers your question.
Best wishes,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
If you want to have images, icons or other content in the RadTabItem header then you have to set the Header property:
1. In a simple scenario with RadTabItem you can set the header as follows :
<telerik:RadTabControl>
<telerik:RadTabItem >
<telerik:RadTabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="/Examples/Common/Images/TabControl/Report/Financial.png"
Height="16" Width="16" />
<TextBlock Text="Financial Report" Margin="3,0,0,0" />
</StackPanel>
</telerik:RadTabItem.Header>
</telerik:RadTabItem>
</telerik:RadTabControl>
2.If you use more complex scenario with DataBinding:
http://demos.telerik.com/silverlight/default.aspx#TabControl/HeaderContent
I hope this answers your question.
Best wishes,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Srinivasa
Top achievements
Rank 1
answered on 07 Mar 2009, 07:30 PM
Thank you.
0
Kevin Marois
Top achievements
Rank 1
answered on 30 Jan 2012, 10:07 PM
I am setting up the tab items in the code behind. How can I create tabs with images in the code behind?
Thank you
Thank you
0
Hello Kevin Marois,
However, we highly suggest you to use XAML when its up to configuring your UI.
All the best,
Petar Mladenov
the Telerik team
This could be something like so:
RadTabControl tabControl =
new
RadTabControl();
RadTabItem item =
new
RadTabItem();
Image img =
new
BitmapImage(...
TextBlock textBlock =
new
TextBlock(){Text =
"Tab Header Text"
};
StackPanel stack =
new
StackPanel(){Orientation = Orientation.Horizontal};
stack.Children.Add(textBlock);
stack.Children.Add(img);
item.Header = stack;
tabControl.Items.Add(item);
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Shawn
Top achievements
Rank 1
answered on 16 Jan 2014, 11:19 PM
Hello,
This link:
http://demos.telerik.com/silverlight/default.aspx#TabControl/HeaderContent
No longer works. I am using databinding in my tab controls. I would like to insert some images(along with the DisplayMemberPath text) in my tab headers if possible that I can make visible or hidden depending on whether rules have been broken. Is it possible to get this link working again so I can have a sample of how to imbed images in tab header items?
Thank you,
Shawn
0
Hi Shawn,
We have previously removed this demo from our online samples. However, you can use this help article as a reference. It shows how to use the ItemTemplate in which you can have Images and Text bound to properties from your ViewMode. We hope it will help you move on with your requirement.
Regards,
Petar Mladenov
Telerik
We have previously removed this demo from our online samples. However, you can use this help article as a reference. It shows how to use the ItemTemplate in which you can have Images and Text bound to properties from your ViewMode. We hope it will help you move on with your requirement.
Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>