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

Bug in RadTabControl when using Windows8 theme: TextBlock placed inside TabItem is invisble (Workaround inside)

1 Answer 66 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
David Liebeherr - rent-a-developer
Top achievements
Rank 1
David Liebeherr - rent-a-developer asked on 25 Oct 2013, 09:19 AM
Hi,

to anyone having the same Issue:

When you use the Windows8 theme (or Windows8Touch theme) and you place a TextBlock inside a RadTabItem, the TextBlock's Foreground is set to white, which makes the TextBlock effectively invisible.
To work around this issue you have to set the ContentTemplate of the RadTabControl like this:

<telerik:RadTabControl>
  <telerik:RadTabControl.ContentTemplate>
    <DataTemplate>
      <ContentControl Content="{Binding}" TextBlock.Foreground="Black" />
    </DataTemplate>
  </telerik:RadTabControl.ContentTemplate>
</telerik:RadTabControl>

This will set the Foreground of all TextBlocks placed inside the TabControl to Black, so that they are visible again.

Please note that this will not work if the IsContentPreserved Property of the RadtabControl is set to true.

I hope this helps someone.

Sincerely yours,
David Liebeherr

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 30 Oct 2013, 08:28 AM
Hello David,

You are right that the Foreground and the Background of any TextBlocks placed in the content of the RadTabItems are both with white color. The best solution if to set the Foreground property of any TextBlock to Black.

However, we managed to fix this issue and the fix is available in our LIB version. Please give the LIB a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
Tags
TabControl
Asked by
David Liebeherr - rent-a-developer
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or