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

RadRibbonWindow theming

5 Answers 152 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Dodd
Top achievements
Rank 1
Dodd asked on 30 Apr 2013, 06:29 AM
Hello,

I've created a custom theme using the telerik-approach.
Everything seems to work except for the RadRibbonWindow.
I've placed RadRibbonWindow.IsWindowsThemeEnabled = false; in the static constructor.
Does custom theming for RadRibbonWindow require any extra code or is it supported at all?

5 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 03 May 2013, 08:57 AM
Hello Dodd,

Please accept my apology for the delayed response.

Unfortunately the RadRibbonWindow styles are applied from code-behind. This is a known issue and it is logged in our PITS.

However, if you need to apply a custom style on the RibbonWindow control, then you can do so in the Loaded event handler of the control. Basically, you'll have to add the custom style in the resources of your application. Then you'll be able to access it from code-behind and explicitly apply it on the RibbonWindow control:
private void RadRibbonWindow_Loaded(object sender, RoutedEventArgs e)
{
    (sender as RadRibbonWindow).Style = App.Current.Resources["RadRibbonWindowStyle"] as Style;
}

On a side note, you said that you're using the Telerik approach for creating a custom theme, but if the approach you use takes advantage of the StyleManager to apply the theme, please consider changing your implementation. Instead, I'd recommend using an implicit styles approach as described in this tutorial. I also attached a sample solution demonstrating how to use our No-XAML dlls and create custom styles for the Telerik components. I've used the Windows7 default styles and I only changed the RibbonWindow style in the solution, but you can go through the Telerik.Controls/Input/Navigation.RibbonView ResourceDictionaries, remove all styles that you won't really need in your solution and modify those that doesn't fit your style requirements.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dodd
Top achievements
Rank 1
answered on 08 May 2013, 03:11 AM
Thank you for the sample project!
You are saying that a custom 'theme' cannot be applied to the RadRibbonWindow, but only a 'style'. Am I getting it right?
I worked my problem out by applying a separate style for the RadRibbonWindow, apart from the custom theme I've created.
Thanks!
0
Tina Stancheva
Telerik team
answered on 10 May 2013, 01:02 PM
Hi Dodd,

Unfortunately you can't apply a custom theme on the RadRibbonWindow - it can only work with the Telerik built-in themes. This is why the custom style approach is the best option for the moment.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rob
Top achievements
Rank 1
answered on 12 Apr 2021, 04:32 PM
Surprisingly this workaround is still required if you use RadRibbonWindow with the noxaml binaries - even if you don't want to customise the styling.  Failure to do this results in a black empty window.
0
Dilyan Traykov
Telerik team
answered on 15 Apr 2021, 11:23 AM

Hello Rob,

Indeed, when using the NoXaml binaries, you need to define an appropriate style because the default RadRibbonWindow implicit style cannot be applied on derived controls as their Type is different than the one defined as a TargetType in the implicit style. This information can be found in the Setting a Theme section of the Ribbon Window documentation article.

Regards,
Dilyan Traykov
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
RibbonView and RibbonWindow
Asked by
Dodd
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Dodd
Top achievements
Rank 1
Rob
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or