Find TabItem - Chande Header

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 07 May 2013 Link to this post


    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?

    best regrads
  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 07 May 2013 Link to this post

    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.

    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top