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

Making RadRibbonWindow IsWindowsThemeEnabled = false

7 Answers 354 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Md. Morshed
Top achievements
Rank 1
Md. Morshed asked on 28 Dec 2011, 09:50 PM
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?

7 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 29 Dec 2011, 10:49 AM
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 >>

0
John Hodgson
Top achievements
Rank 2
answered on 03 Jan 2012, 05:49 PM
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>
0
Md. Morshed
Top achievements
Rank 1
answered on 04 Jan 2012, 11:18 AM
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?
0
Tina Stancheva
Telerik team
answered on 06 Jan 2012, 12:06 PM
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 >>

0
John Hodgson
Top achievements
Rank 2
answered on 06 Jan 2012, 12:12 PM
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.



0
Md. Morshed
Top achievements
Rank 1
answered on 06 Jan 2012, 12:16 PM
Thanks , I got it work. Perfect!! :)
0
Tina Stancheva
Telerik team
answered on 10 Jan 2012, 02:52 PM
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 >>

Tags
RibbonView and RibbonWindow
Asked by
Md. Morshed
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
John Hodgson
Top achievements
Rank 2
Md. Morshed
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or