RadRibbonWindow IsWindowsThemeEnabled breaks with Q3 2013

12 posts, 0 answers
  1. Kevin
    Kevin avatar
    11 posts
    Member since:
    May 2012

    Posted 16 Oct 2013 Link to this post

    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.  
  2. Jean-Pierre
    Jean-Pierre avatar
    6 posts
    Member since:
    Jan 2013

    Posted 17 Oct 2013 Link to this post

    Hi,

    Same issue for me.

    Regards.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 17 Oct 2013 Link to this post

    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 >>
  5. Florian
    Florian avatar
    2 posts
    Member since:
    Jul 2011

    Posted 20 Oct 2013 Link to this post

    Hello Stefan,

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

    Regards.
  6. Bert
    Bert avatar
    29 posts
    Member since:
    May 2012

    Posted 22 Oct 2013 Link to this post

    Hello,

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

    Regards,
    Bert
  7. Jean-Pierre
    Jean-Pierre avatar
    6 posts
    Member since:
    Jan 2013

    Posted 22 Oct 2013 Link to this post

    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.
  8. Gregor Jaksa
    Gregor Jaksa avatar
    9 posts
    Member since:
    Jan 2008

    Posted 22 Oct 2013 Link to this post

    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
  9. Bert
    Bert avatar
    29 posts
    Member since:
    May 2012

    Posted 22 Oct 2013 Link to this post

    Hello,

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

    Kind regards,
    Bert

  10. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 22 Oct 2013 Link to this post

    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 >>
  11. Hyunho
    Hyunho avatar
    23 posts
    Member since:
    Feb 2013

    Posted 29 Oct 2013 Link to this post

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

    Posted 30 Oct 2013 Link to this post

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

    Posted 04 Nov 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready