Making RadRibbonWindow IsWindowsThemeEnabled = false

8 posts, 0 answers
  1. Md. Morshed
    Md. Morshed avatar
    6 posts
    Member since:
    Sep 2010

    Posted 28 Dec 2011 Link to this post

    I have seen that the documentation says - http://www.telerik.com/help/wpf/radribbonview-ribbon-window-wpf.html  
    RadRibbonWindow.IsWindowsThemeEnabled = false;
    and setting a theme to make the ribbonwindow theme aware. I want exactly the documentation example. But I didn't  find any such property in Q2 release of 2011 edition. Can you please correct me if was wrong there?
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 29 Dec 2011 Link to this post

    Hello,

     This property is available with Q3.2011 release. So you should update to it first. 

    Regards,
    Miro Miroslavov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. John Hodgson
    John Hodgson avatar
    8 posts
    Member since:
    Sep 2009

    Posted 03 Jan 2012 Link to this post

    I have tried applying this with 2011 Q3 SP1 and I cannot get it to work.  What am I doing wrong?

    My code is very simple:

    using System;
    using System.Linq;
    using Telerik.Windows.Controls;
     
    namespace WpfApplication3
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : RadRibbonWindow
        {
            static MainWindow()
            {
                RadRibbonWindow.IsWindowsThemeEnabled = false;
            }
            public MainWindow()
            {
                StyleManager.ApplicationTheme = new SummerTheme();
                InitializeComponent();
            }
        }
    }

    and the window.xaml

    <telerik:RadRibbonWindow x:Class="WpfApplication3.MainWindow"
            Title="MainWindow" Height="350" Width="525">
        <Grid>
            <telerik:RadRibbonView Name="radRibbonView1">
                <telerik:RadRibbonTab Header="RibbonTab" />
            </telerik:RadRibbonView>
        </Grid>
    </telerik:RadRibbonWindow>
  5. Md. Morshed
    Md. Morshed avatar
    6 posts
    Member since:
    Sep 2010

    Posted 04 Jan 2012 Link to this post

    I have updated my project with Q3 2011 release. Now, I have added these two lines in
    constructor before initializing components -

                RadRibbonWindow.IsWindowsThemeEnabled = false;
                StyleManager.ApplicationTheme = new Windows7Theme();
                this.InitializeComponent();
    and here is the result(see the attached image) on OS classic theme enabled. I think it has opacity issue. Not only that , it also cut off the lower portion of my window when I do maximized that. Any idea?
  6. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 06 Jan 2012 Link to this post

    Hi guys,

    I attached a sample project demonstrating how to set Telerik Summer theme on the RibbonWindow control. In a non-aero theme applied on your machines you should get this:


    @ Md. Morshed - The issue in your case is caused by the fact that the RadRibbonWindow.IsWindowsThemeEnabled property isn't set in the static constructor of the RibbonWindow. Basically the RadRibbonWindow.IsWindowsThemeEnabled static property has to be set either in the static constructor of the RadRibbonWindow or in the constructor of the App class.

    @ John - Can you please make sure that you're testing the application on a machine where the OS theme isn't aero? If the theme is aero then the Telerik themes won't be applied to the RibbonWindow control.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. John Hodgson
    John Hodgson avatar
    8 posts
    Member since:
    Sep 2009

    Posted 06 Jan 2012 Link to this post

    Hi it does work when aero is turned off, I was thinking it related to the following issue which is marked as solved:

    http://www.telerik.com/support/pits.aspx#/public/silverlight/6950 

    I want to be able to specify the look and feel like Microsoft Office.



  8. Md. Morshed
    Md. Morshed avatar
    6 posts
    Member since:
    Sep 2010

    Posted 06 Jan 2012 Link to this post

    Thanks , I got it work. Perfect!! :)
  9. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 10 Jan 2012 Link to this post

    Hi,

    @ Md. Morshed - I am glad you get it to work.

    @ John - The RadRibbonWindow can only use the Telerik themes when its window chrome doesn't use the aero theme. And the PITS issue that is marked as resolved described the inability of the RibbonWindow to use Telerik themes at all. This is why adding the non-aero Telerik theme support fixes this issue. However, in an aero-theme the Telerik themes cannot be used as they cannot style an aero chrome.

    Let us know if we can further assist you in any way.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready