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

Changing title color of RadRibbonWindow in Expression_DarkTheme

2 Answers 228 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 13 May 2014, 12:34 AM
I am using Expression_DarkTheme.

There is one  problem.

My window tilte color is setted white color.

I want to change the color(white -> black).

What should I do?

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 13 May 2014, 03:32 PM
Hello Lee,

In order to change the foreground color of the RibbonWindow's title you can alter the template of the title through the TitleBarStyle property of the window. You can take a look how to extract a template in our Editing Control Templates help article. Basically you can set the WindowTitle style and change the Foreground property of the TextBlocks inside its ControlTemplate. Here is the style:
xmlns:telerikRibbonViewPrimitives="clr-namespace:Telerik.Windows.Controls.RibbonView.Primitives;assembly=Telerik.Windows.Controls.RibbonView"
 
......
 
<Style x:Key="style1" TargetType="telerikRibbonViewPrimitives:WindowTitle">
    <Setter Property="Margin" Value="0 0 0 5"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerikRibbonViewPrimitives:WindowTitle">
                <StackPanel Orientation="Horizontal">
                    <TextBlock x:Name="Title" Text="{TemplateBinding Title}"
                               TextTrimming="CharacterEllipsis"
                               Foreground="Black"/>
                    <TextBlock x:Name="Divider"
                        Text="{telerik:LocalizableResource Key=RibbonBarWindowTitleDivider}"
                        Visibility="{TemplateBinding DividerVisibility}"
                        Foreground="Black"/>
                    <TextBlock x:Name="ApplicationName"
                        Text="{TemplateBinding ApplicationName}"
                        TextTrimming="CharacterEllipsis"
                        Foreground="Black"/>
                </StackPanel>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
..................
<telerik:RadRibbonWindow  TitleBarStyle="{DynamicResource style1}" ...

For your convenience I extracted the template and prepared a sample project.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Lee
Top achievements
Rank 1
answered on 14 May 2014, 12:39 AM
Thank you for reply.

I solve it.

Thank you
Tags
RibbonView and RibbonWindow
Asked by
Lee
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Lee
Top achievements
Rank 1
Share this question
or