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

RadRibbonWindow IsWindowsThemeEnabled breaks with Q3 2013

11 Answers 158 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
developer
Top achievements
Rank 2
developer asked on 16 Oct 2013, 05:20 PM
Everything ran fine, then I updated to Q3 2013, did an update Wizard, ran my application and setting 

static MainWindow()
{
    RadRibbonWindow.IsWindowsThemeEnabled = false;
}

Renders my RadRibbonWindow as completely white now.  Setting it to true, I can see everything as expected.  

11 Answers, 1 is accepted

Sort by
0
Jean-Pierre
Top achievements
Rank 1
answered on 17 Oct 2013, 08:47 AM
Hi,

Same issue for me.

Regards.
0
Stefan
Telerik team
answered on 17 Oct 2013, 09:14 AM
Hi,

We made a change in the RadRibbonWindow in order it to work with our implicit styles. This change cause the described behavior. 

You don't have to comment the IsWindowsThemeEnabled line or set it to true. The only thing you have to do is to add a style in the application's resources which TargetType to be the MainWindow. Here is a code snippet showing what you have to add in the App.xaml file:

<Application.Resources>
    <Style TargetType="local:MainWindow" />
</Application.Resources>

Please give this approach a try and let us know if it works for you.

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Florian
Top achievements
Rank 2
answered on 20 Oct 2013, 02:41 PM
Hello Stefan,

can you please upload a sample project including your changes?
I still get a white Window after adding your code snippet.

Regards.
0
Bert
Top achievements
Rank 1
answered on 22 Oct 2013, 05:43 AM
Hello,

we have the same problem. I tried the proposed solution but it does not seems to work.

Regards,
Bert
0
Jean-Pierre
Top achievements
Rank 1
answered on 22 Oct 2013, 07:03 AM
Hi guys, this is the answer i got from the support and it works very well (i'm using implicit styles) :

In order to apply our 
ImplicitStyles on the RadRibbonWindow you need to create a different ResourceDictionary and define in it the following style:

<Style BasedOn="{StaticResource RadRibbonWindowStyle}" TargetType="local:MainWindow" />
Please note that the TargetType is your main page - in this case the MainWindow, this is why you need to set the build action of theResourceDictionary to Page. 

So your App.xaml should looks like :

<Application x:Class="RibbonIssue.Application"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:RibbonIssue"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
                <ResourceDictionary Source="RibbonWindowStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

and the new file RibbonWindowStyle like :

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:RibbonIssue"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Style BasedOn="{StaticResource RadRibbonWindowStyle}" TargetType="local:MainWindow" />
</ResourceDictionary>

Regards.
0
Gregor Jaksa
Top achievements
Rank 1
answered on 22 Oct 2013, 09:54 AM
Hello,

I am evaluating the use of telerik wpf components for our product. I followed the fix you mentioned here for the office 2013 theme.

Attached is the picture of the result of the window when using RadRibbonWindow. Can please someone confirm if this is the theme used or there is a bug that results the window to be displayed like this.

Thank you
0
Bert
Top achievements
Rank 1
answered on 22 Oct 2013, 11:03 AM

Hello,

when can we expect a hot fix for this issue? (IsWindowsThemeEnabled=false)

Kind regards,
Bert

0
Stefan
Telerik team
answered on 22 Oct 2013, 12:06 PM
Hi guys,

@Bert - This is not a bug. This is intended change in order to make the RadRibbonWindow to work with implicit styles.

@Gregor Jaksa - Everything on the picture looks fine, this is how the RadRibbonWindow should looks like when the new Office2013 theme is applied. The issue the others guys are commenting is that the RadRibbonWindow appears white when the new approach is not used.

I attached a sample project where this solution is shown. In the example I used the same code that Jean-Pierre posted.

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Hyunho
Top achievements
Rank 1
answered on 30 Oct 2013, 12:00 AM
Hello Stefan,

Your sample seems to work for Binaries.NoXaml environment. right?

Telerik.Windows.Themes.Office_Black.dll is only exit in Binaries.NoXaml directory. (The sample is referencing Office_Black)

I'm so confusing because when I got answer from the support ticket, he answered "Use Binaries not Binaries.NoXaml" and see following link.
http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html
0
Tina Stancheva
Telerik team
answered on 30 Oct 2013, 06:00 PM
Hello Hyunho,

The reason why you were advised to reference the normal assemblies in your ticket was the fact that we thought that you were using the StyleManager to apply a theme in your application.

However, please note that the StyleManager although very convenient, was our solution to the lack of implicit styles available within the previous versions of WPF. Once you set a theme through the StyleManager, it basically applies a style on the appropriate control(s). However, now that WPF supports implicit styles you can easily create even application-wide themes.

On top of that, with the implicit styles approach, you have all xaml resources available in your application and you can track any style-related dependencies or change the style settings to customize the default appearance of a component. Moreover, you can use our NoXaml assemblies and add only the styles that you actually need in your application. This way you will minimize the size of your application.

This is why I'd recommend the more native approach - using implicit styles and taking advantage of our NoXaml assemblies in your application. In that case you can follow the guidence provided above to apply a theme on the RadRibbonWindow.

Please let us know if you need more information.

Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Tina Stancheva
Telerik team
answered on 04 Nov 2013, 09:18 AM
Hello,

As a follow up, I wanted to let you know that we addressed the issue with the IsWindowsThemeEnabled
property and the StyleManager. With the latest internal build that will be uploaded later today, you will be able to use the StyleManager to set a theme on the window as long as the IsWindowsThemeEnabled
property is False.

However, we would still recommend using implicit styles instead of applying a theme through StyleManager.

Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
RibbonView and RibbonWindow
Asked by
developer
Top achievements
Rank 2
Answers by
Jean-Pierre
Top achievements
Rank 1
Stefan
Telerik team
Florian
Top achievements
Rank 2
Bert
Top achievements
Rank 1
Gregor Jaksa
Top achievements
Rank 1
Hyunho
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or