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

RibbonWindow TitleBar Color

4 Answers 80 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 30 Nov 2016, 11:22 AM

Hello!

Is it possible to change the titelbar background color (window titlebar) to the Office 2016 theme accent color?

4 Answers, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 02 Dec 2016, 09:44 AM
Hello Michael, 

You can change the AccentColor from the Office2016 Palette and this way the window titlebar and ribbontabs panel will have the same color: 
Office2016Palette.Palette.AccentColor = (Color)ColorConverter.ConvertFromString("#7FFF00");

If you need to change the Background of the RibbonTabs panel - you can set TitleBarBackground property of RibbonView. This way you will achieve the look from the attached picture.

Please have in mind that if you want to apply our Telerik themes to RibbonWindow you need to set RadRibbonWindow.IsWindowsThemeEnabled property to false as you can read here

I hope this information is helpful.

Regards,
Milena
Telerik by Progress
Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
0
Mike
Top achievements
Rank 2
answered on 05 Dec 2016, 12:43 PM
Thank you, worked like a charm!
0
Matt
Top achievements
Rank 1
Veteran
answered on 01 Dec 2020, 05:32 PM

Hello all,

I have a similar goal, but I want to set the title bar of the app to a specific color myself based on what database the program connects to.

However, I can't get the first step, setting RadRibbonWindow.IsWindowsThemeEnabled = false, to work because according to the article you linked to, I need this line in my resource dictionaries:

<ResourceDictionary Source="RibbonWindowStyle.xaml" />

 

But the program can't find that file anywhere.  Where does that file come from?

Thanks!
Matt

0
Martin Ivanov
Telerik team
answered on 03 Dec 2020, 08:21 AM

Hello Matt,

You need to create the file manually and add the corresponding Style in it. This step is described in the Setting a Theme section of the article linked in Milena's reply. For your convenience I will post the information also here:

  1. Create a new ResourceDictionary called RibbonWindowStyle.
  2. Define a new Style targeting your window that derives from RadRibbonWindow (for example the MainWindow) and base it on the default RadRibbonWindowStyle which is located in the Telerik theme resource files.
    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                        xmlns:local="clr-namespace:RibbonWindow_ImplicitStylesDemo"> 
        <Style TargetType="local:MainWindow" BasedOn="{StaticResource RadRibbonWindowStyle}" /> 
    </ResourceDictionary> 
  3. Merge the RibbonWindowStyle in the App.xaml Resources, after the Telerik theme resource files.

Note that this step is required only if you use NoXaml dlls and the implicit styles theming approach.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
RibbonView and RibbonWindow
Asked by
Mike
Top achievements
Rank 2
Answers by
Milena
Telerik team
Mike
Top achievements
Rank 2
Matt
Top achievements
Rank 1
Veteran
Martin Ivanov
Telerik team
Share this question
or