Changing title color of RadRibbonWindow in Expression_DarkTheme

3 posts, 0 answers
  1. Lee
    Lee avatar
    30 posts
    Member since:
    Apr 2014

    Posted 12 May 2014 Link to this post

    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. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 13 May 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Lee
    Lee avatar
    30 posts
    Member since:
    Apr 2014

    Posted 13 May 2014 in reply to Martin Link to this post

    Thank you for reply.

    I solve it.

    Thank you
Back to Top