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

TextBlock style in RadDocking control not applied in runtime

1 Answer 25 Views
Docking
This is a migrated thread and some comments may be shown as answers.
T N
Top achievements
Rank 1
T N asked on 08 Apr 2014, 09:10 AM
Hi all,
I currently have a problem with applying Style for TextBlock when TextBlock is in RadDocking control. I have a simple example below.

- The app will use Windows8Theme

public App()
{
    StyleManager.ApplicationTheme = new Windows8Theme();
}

The TextBlock is set with FontWeight Bold.

<telerik:RadDocking Grid.Row="1" HasDocumentHost="False">
    <telerik:RadSplitContainer Orientation="Horizontal">
        <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200, 200">
            <telerik:RadPane PaneHeaderVisibility="Collapsed">
                <Grid>
                    <TextBlock FontWeight="Bold" Margin="50" Foreground="Green" Text="HIHI" />
                </Grid>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

In the designer it was correctly displayed

http://i.imgur.com/dRAuixu.png

But in runtime it was not

http://i.imgur.com/F1Cchw1.png

I think that setting ApplicationTheme in App() has overwritten the Style of TextBlock.

Question: What should I do to keep FontWeight of TextBlock from overwriting by StyleManager?

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 09 Apr 2014, 02:10 PM
Hello,

In order to support dynamic FontSizes in the Telerik Windows8Theme there is a built-in Style in that theme that Targets every TextBlock and set specific values to its Style properties. In this case the issue is that the default FontFamily is set to Segoe UI Semibold which itself doesn't have an Bold style, meaning that when setting the FontWeight to Bold the style is correctly set but there is no visual representation for it.

In order to resolve this issue all you will need to set a different FontFamily from the default Segoe UI Semibold one, for example Segoe UI.


Regards,
Vladi
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Docking
Asked by
T N
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or