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

Find TabItem - Chande Header

1 Answer 73 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 07 May 2013, 07:57 AM
Hi,

i use the ContentTemplateSelector property of the RadTabControl. This way i can define different DataTemplates.

I created a property in my TabViewModel class called Content and based on its value I am selecting different DataTemplates. I also defined the different DataTemplates in the App.xaml file.

Now I want to change the Header of the TabItem out of the UserControl. And this is the problem, how do I solve this problem?

thanks
best regrads
rene

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 07 May 2013, 03:05 PM
Hi ITA,

 It's great that you use the MVVM pattern. Simply introduce a string property in your TabViewModel, for example "TabHeader" and bind it like so:

<Style TargetType="telerik:RadTabItem">
      <Setter Property="Header" Value={Binding TabHeader}" />
    ....
Let us know if this helps you proceed further.

Regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TabControl
Asked by
ITA
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or