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

mystery of the missing controls (Win8 theme bug)

2 Answers 136 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 20 Aug 2013, 08:55 AM

N.B. Framework 4.5

// first in Application  App.cs set at runtime theme windows8
protected override void OnStartup(StartupEventArgs e)
{           
    StyleManager.ApplicationTheme = new Windows8Theme();                   
}

// Then create two VIEW

// First is MASTER_VIEW
// ADD XAML
  <telerik:RadTabControl Grid.Row="0" >

            <telerik:RadTabItem DropDownContent="Trend Import" Header="DETAIL" >
                <telerik:RadTabItem.Content>
                    <views:DETAIL_VIEW/>
                </telerik:RadTabItem.Content>
            </telerik:RadTabItem>

</telerik:RadTabControl>

// ADD SECOND XAML -> DETAIL_VIEW
<Grid>

   <GroupBox Header="tyy tyy" >
           <TextBlock Text="Settings"/> 
    </GroupBox>
 </Grid>
      
Build and run WPF APPLICATION

TextBlock is not visible. Cannot see content(Text) of any TextBlock controls?
I use default style at all.

Workaround:
Remove: OnStartup(StartupEventArgs e) function, stay at default theme.
You will see all textblock controls again.

Additional info: This bug depends and others controls like GroupBox and others.

Framework 4.5
VS2012

Telerik v. 2013.2.611.45 (For framework 4.5)

This is styles that I use. In comment is second workaround.

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  
    <ControlTemplate x:Key="TextBoxErrorTemplate">
        <DockPanel LastChildFill="True" >
            <Border BorderBrush="Red" BorderThickness="1" >
                <AdornedElementPlaceholder x:Name="Holder"  />
            </Border>
            <Label  Foreground="White" Content="{Binding ElementName=Holder, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" BorderThickness="1" BorderBrush="White" Background="Red" UseLayoutRounding="True"  />
        </DockPanel>
    </ControlTemplate>
  
      
    <Style TargetType="Button"
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="IsEnabled" Value="False"/>                                        
                </Trigger>
                <Trigger Property="Validation.HasError" Value="false">
                    <Setter Property="IsEnabled" Value="True"/>                     
                </Trigger>                
            </Style.Triggers>
    </Style>
  
    <Style x:Key="LinkButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <TextBlock TextDecorations="Underline">
                    <ContentPresenter />
                    </TextBlock>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="Blue" />
        <Setter Property="Cursor" Value="Hand" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Foreground" Value="Red" />
            </Trigger>
        </Style.Triggers>
    </Style>
  
 <!--
    <Style TargetType="TextBlock">
        <Setter Property="Foreground" Value="#FF151515" />       
    </Style>
  
    <Style TargetType="GroupBox">
        <Setter Property="Foreground" Value="#FF151515" />
    </Style>
-->
      
</ResourceDictionary>
     


                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
  
    
  
    <Style x:Key="LinkButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <TextBlock TextDecorations="Underline">
                        <ContentPresenter />
                    </TextBlock>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="Blue" />
        <Setter Property="Cursor" Value="Hand" />
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Foreground" Value="Red" />
            </Trigger>
        </Style.Triggers>
    </Style>
  
</ResourceDictionary>

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 23 Aug 2013, 06:48 AM
Hi Petar,

 We are aware of this issue and it will be fixed in the Q3 2013 Official Release. As a workaround, you can set the Foreground of the elements you don't see explicitly.

Regards,
Petar Mladenov
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 >>
0
kity
Top achievements
Rank 2
answered on 23 Sep 2013, 11:22 AM
thank you

 

already did that.

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