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.
<
ResourceDictionary
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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
>
<
ResourceDictionary
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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
>