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 <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> <telerik:RadGridView ItemsSource="{Binding Object.Details.Attributes}" AutoGenerateColumns="True" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" CanUserDeleteRows="False" CanUserInsertRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserFreezeColumns="False" CanUserSortColumns="False" IsFilteringAllowed="False" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" DataLoadMode="Asynchronous" IsReadOnly="{Binding IsEditing, Converter={StaticResource InvertBoolConverter}}" EnableRowVirtualization="True" FrozenColumnCount="1" AllowDrop="True" behaviors:RowReorderBehavior.IsEnabled="True" BeginningEdit="Attributes_RadGridView_BeginningEdit" > <telerik:RadGridView.Resources> <DataTemplate x:Key="DraggedItemTemplate"> <StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Text="Dragging:" /> <TextBlock Text="{Binding CurrentDraggedItem}" FontWeight="Bold" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding CurrentDropPosition}" FontWeight="Bold" MinWidth="45" /> <TextBlock Text=", (" Foreground="Gray" /> <TextBlock Text="{Binding CurrentDraggedOverItem}" /> <TextBlock Text=")" Foreground="Gray" /> </StackPanel> </StackPanel> </DataTemplate> </telerik:RadGridView.Resources> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="Attribute" DataMemberBinding="{Binding Attribute.TechName}" IsReadOnly="True"/> ....... <telerik:GridViewDataColumn Header="Length" DataMemberBinding="{Binding Attribute.Details.LengthInternal}" IsReadOnly="True"/> </telerik:RadGridView.Columns> </telerik:RadGridView>
But with this code, rows are displayed blank (only headers and scrollbars are visibles) :
<telerik:RadGridView ItemsSource="{Binding Object.Details.Attributes}"
AutoGenerateColumns="True"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Visible"
CanUserDeleteRows="False"
CanUserInsertRows="False"
CanUserReorderColumns="False"
CanUserResizeRows="False"
CanUserFreezeColumns="False"
CanUserSortColumns="False"
IsFilteringAllowed="False"
RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False"
DataLoadMode="Asynchronous"
IsReadOnly="{Binding IsEditing, Converter={StaticResource InvertBoolConverter}}"
EnableRowVirtualization="True"
FrozenColumnCount="1"
AllowDrop="True"
behaviors:RowReorderBehavior.IsEnabled="True"
BeginningEdit="Attributes_RadGridView_BeginningEdit"
>
<telerik:RadGridView.Resources>
<DataTemplate x:Key="DraggedItemTemplate">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Dragging:" />
<TextBlock Text="{Binding CurrentDraggedItem}"
FontWeight="Bold" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding CurrentDropPosition}" FontWeight="Bold" MinWidth="45" />
<TextBlock Text=", (" Foreground="Gray" />
<TextBlock Text="{Binding CurrentDraggedOverItem}" />
<TextBlock Text=")"
Foreground="Gray" />
</StackPanel>
</StackPanel>
</DataTemplate>
</telerik:RadGridView.Resources>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Attribute" DataMemberBinding="{Binding Attribute.TechName}" IsReadOnly="True"/>
.....
<telerik:GridViewDataColumn Header="Length" DataMemberBinding="{Binding Attribute.Details.LengthInternal}" IsReadOnly="True"/>
</telerik:RadGridView.Columns>
<telerik:RadGridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="Red"/>
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
</Style>
</telerik:RadGridView.RowStyle>
</telerik:RadGridView>
public class MainViewModel{ public ObservableCollection<DataObject> Data{get;set;} ...}public class DataObject{ public string Name { get; set; } public ObservableCollection<DataPair> Data { get; set; }} public class DataPair{ public DateTime Time { get; set; } public double Value { get; set; }}<telerik:RadCartesianChart.SeriesProvider> <telerik:ChartSeriesProvider Source="{Binding Data}"> <telerik:ChartSeriesProvider.SeriesDescriptors> <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="Value" CategoryPath="Time"> <telerik:CategoricalSeriesDescriptor.Style> <Style TargetType="telerik:LineSeries"> <Setter Property="RenderMode" Value="Light"/> </Style> </telerik:CategoricalSeriesDescriptor.Style> </telerik:CategoricalSeriesDescriptor> </telerik:ChartSeriesProvider.SeriesDescriptors> </telerik:ChartSeriesProvider></telerik:RadCartesianChart.SeriesProvider><telerik:RadChart Content="RadChart" HorizontalAlignment="Left" Margin="10,455,0,10" Grid.Row="1" Width="791"/><telerik:RadSplitContainer x:Name="Split" Width="300" ><telerik:RadPaneGroup DockPanel.Dock="Top" ><telerik:RadPane x:Name="radPane" Header="Elements" > <extensions:RadDiagramToolbox telerik:StyleManager.Theme="Windows8" Title="Gallery" DataContext="{StaticResource model}" ItemsSource="{Binding Galleries}" ItemTemplate="{StaticResource ToolboxGroupTemplate}" Width="{Binding Width, ElementName=radPane, Mode=TwoWay}" /> </telerik:RadPane>
</telerik:RadPaneGroup></telerik:RadSplitContainer>