RadRibbonWindow theming

4 posts, 1 answers
  1. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 30 Apr 2013 Link to this post

    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?
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 03 May 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 07 May 2013 Link to this post

    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!
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 10 May 2013 Link to this post

    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.

Back to Top