Hello.
How do I set the TabItem.Header to bindings taken from few fields, each binding shown in a different size, all in the place of the original header text; without overriding the default style and behavior of the header - I only need the text.
I tried to set its template but then it creates a rectangle that contains the inner controls, and this rectengle is not responsive for user clicks, and also have the control-style, i want this controls to be unvisible, only its text should be visible.
I've tried the following:
<TabControl ItemsSource="{Binding}">
<TabControl.ItemTemplate>
<DataTemplate>
<TabItem>
<TabItem.Header>
<MultiBinding StringFormat="{}{0}-{1}">
<Binding Path="Title"/>
<Binding Path="Category.Title"/>
</MultiBinding>
</TabItem.Header>
<TabItem.Content>
<TextBlock>
Here is what is gonna be in the TabItem - not header
</TextBlock>
</TabItem.Content>
</TabItem>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
But it doesn't show anything.
I've also tried to set the HeaderTemplate to a DataTemplate but what happens is, the DataTemplate overrides the TabItem style and when I click the text it doesn't go to the clicked tab, besides, the unselected tabs look very funny, I see the rectengle of the text floating, while I want it to be transparent.
So, to summarize up my question, I want to set TabItem.Header.Text to a MultiBinding with StringFormat.
Any idea would be really appreciated. Thanks.