We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Titlebar of RibbonWindow is black and has no controls when Ribbon is in it

Hi everybody,

there is a problem using Ribbonwindows for me. When I change the window from Window to Ribbonwindow everything is fine but as soon as I add a ribbon the titlebar changes to black and has no more controls in it.

Is there anything I have to change?

<syncfusion:RibbonWindow x:Class="WILO_Labelling.MainWindow"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                         xmlns:p="clr-namespace:WILO_Labelling.Properties"
                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:local="clr-namespace:WILO_Labelling"
                         xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
                         xmlns:skinmanager="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
                         mc:Ignorable="d"
                         Title="" 
                         Height="350" 
                         Width="525" 
                         skinmanager:SfSkinManager.VisualStyle="Office365"
                         Closed="_mainWindow_Closed">

    <syncfusion:RibbonWindow.DataContext>
        <local:ViewModel_MainWindow />
    </syncfusion:RibbonWindow.DataContext>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <syncfusion:Ribbon x:Name="_ribbon" VerticalAlignment="Top" IsQATContextMenuEnabled="True" IsQATCustomizationEnabled="True" EnableMoreCommands="True" BackStageCornerImageVisibility="Collapsed">
                <syncfusion:RibbonTab Caption="Main">
                    <syncfusion:RibbonBar Header="Functions">
                        <syncfusion:RibbonButton Name="btnRibbon_Plants" 
                                                 SizeForm="Large" 
                                                 Label="Plants"
                                                 LargeIcon="/Assets/Business_64x.png"
                                                 Click="RibbonButton_Click"/>
                        <syncfusion:RibbonButton Name="btnRibbon_Cluster" 
                                                 SizeForm="Large" 
                                                 Label="Cluster"
                                                 LargeIcon="/Assets/Diagram_64x.png"
                                                 Click="RibbonButton_Click"/>
                        <syncfusion:RibbonButton Name="btnRibbon_Dashboard" 
                                                 SizeForm="Large" 
                                                 Label="Dashboard"
                                                 LargeIcon="/Assets/Timer_64x.png"
                                                 Click="RibbonButton_Click"/>
                    </syncfusion:RibbonBar>
                </syncfusion:RibbonTab>
            </syncfusion:Ribbon>
        </Grid>

        <Grid Grid.Row="1" x:Name="grdLabel">
            <Frame Source="/Pages/pagLabelPrinting.xaml" />
        </Grid>
    </Grid>
</syncfusion:RibbonWindow>

If I just disable the ribbon everything looks good.

<syncfusion:RibbonWindow x:Class="WILO_Labelling.MainWindow"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                         xmlns:p="clr-namespace:WILO_Labelling.Properties"
                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:local="clr-namespace:WILO_Labelling"
                         xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
                         xmlns:skinmanager="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
                         mc:Ignorable="d"
                         Title="" 
                         Height="350" 
                         Width="525" 
                         skinmanager:SfSkinManager.VisualStyle="Office365"
                         Closed="_mainWindow_Closed">

    <syncfusion:RibbonWindow.DataContext>
        <local:ViewModel_MainWindow />
    </syncfusion:RibbonWindow.DataContext>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <!--<syncfusion:Ribbon x:Name="_ribbon" VerticalAlignment="Top" IsQATContextMenuEnabled="True" IsQATCustomizationEnabled="True" EnableMoreCommands="True" BackStageCornerImageVisibility="Collapsed">
                <syncfusion:RibbonTab Caption="Main">
                    <syncfusion:RibbonBar Header="Functions">
                        <syncfusion:RibbonButton Name="btnRibbon_Plants" 
                                                 SizeForm="Large" 
                                                 Label="Plants"
                                                 LargeIcon="/Assets/Business_64x.png"
                                                 Click="RibbonButton_Click"/>
                        <syncfusion:RibbonButton Name="btnRibbon_Cluster" 
                                                 SizeForm="Large" 
                                                 Label="Cluster"
                                                 LargeIcon="/Assets/Diagram_64x.png"
                                                 Click="RibbonButton_Click"/>
                        <syncfusion:RibbonButton Name="btnRibbon_Dashboard" 
                                                 SizeForm="Large" 
                                                 Label="Dashboard"
                                                 LargeIcon="/Assets/Timer_64x.png"
                                                 Click="RibbonButton_Click"/>
                    </syncfusion:RibbonBar>
                </syncfusion:RibbonTab>
            </syncfusion:Ribbon>-->
        </Grid>

        <Grid Grid.Row="1" x:Name="grdLabel">
            <Frame Source="/Pages/pagLabelPrinting.xaml" />
        </Grid>
    </Grid>
</syncfusion:RibbonWindow>

Can you please help me?


Thank you very much!


Victor

Attachment: RibbonWindow_1e4e4ff0.zip

8 Replies

SR Sabaridass Ramamoorthy Syncfusion Team April 16, 2019 12:18 PM UTC

Hi Victor,

Thanks for contacting Syncfusion Support.

Based on your provided information, we have checked the reported scenario with our working sample but we are unable to reproduce the reported issue in our side. We have prepared a sample and video for your reference and it can be downloaded from below location. 



Also instead of black background we are getting white background from our side only in the below cases.

1. If any of the required assemblies are not properly added in the application. For example when applying office 365 theme, “Syncfusion.SfSkinManager.Wpf.dll” ,“Syncfusion.Themes.Office365.Wpf.dll” must be included.
2. If we override the style or export the themes from theme studio in App.xaml (globally) file and not properly set RibbonWindow.Style property  using the key of overridden style. 
Please check with the sample and video and let us know if we have misunderstood your query. If possible, can you please share the additional information such as currently using version of Essential Studio or else modify the above sample which replicates the issue? It will helps us to provide the solution at earliest.  

Please let us know if you need further assistance.

Regards,
Sabaridass R 



VD Victor Dienstbier April 16, 2019 01:58 PM UTC

Thank you for the quick reply!

Maybe I found the reason for the problem with you help:

When I deleted the xaml code skinmanager:SfSkinManager.VisualStyle="Office365" the window was shown correctly.

I saw that in the code behind automatically the following code behind of the window was inserted when I created the project:

public partial class MainWindow : RibbonWindow
    {
#region Fields
        private string currentVisualStyle;
        #endregion

        #region Properties
        /// <summary>
        /// Gets or sets the current visual style.
        /// </summary>
        /// <value></value>
        /// <remarks></remarks>
        public string CurrentVisualStyle
        {
            get
            {
                return currentVisualStyle;
            }
            set
            {
                currentVisualStyle = value;
                OnVisualStyleChanged();
            }
        }
        #endregion
        public MainWindow()
        {
            InitializeComponent();
this.Loaded += OnLoaded;
        }
/// <summary>
        /// Called when [loaded].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            CurrentVisualStyle = "Office365";
        }
/// <summary>
        /// On Visual Style Changed.
        /// </summary>
        /// <remarks></remarks>
        private void OnVisualStyleChanged()
        {
            VisualStyles visualStyle = VisualStyles.Default;
            Enum.TryParse(CurrentVisualStyle, out visualStyle);            
            if (visualStyle != VisualStyles.Default)
            {
                SfSkinManager.ApplyStylesOnApplication = true;
                SfSkinManager.SetVisualStyle(this, visualStyle);
                SfSkinManager.ApplyStylesOnApplication = false;
            }
        }
        private void _mainWindow_Closed(object sender, EventArgs e)
        {
            Application.Current.Shutdown();
        }

    }

I guess this might be the problem...


SR Sabaridass Ramamoorthy Syncfusion Team April 17, 2019 11:24 AM UTC

Hi Victor,

Thanks for the update.

We are able to reproduce the reported issue - “Black background around the RibbonWindow Titlebar”  from our side only when set “SfSkinManager.ApplyStylesOnApplication” as true.  Currently we analyzing the root cause for this problem  and provide you more details on April 26, 2019.

From your update, you have applied the office 365 theme in both designer and code behind. So kindly update us the reason for applying the theme twice which could be helpful for us to provide the solution at earliest.

Please let us know if you require further assistance.

Regards, 
Sabaridass R 



VD Victor Dienstbier April 17, 2019 02:21 PM UTC

Hi!

There is no reason for applying the Skin twice :-)

I created the Project with the help of your wizard in Visual Studio. I didn't check if there is Code behind in the window, because I try to do everything in MVVM...


If just seems to not work Setting both.


Best wishes


Victor


JP Jagadeesan Pichaimuthu Syncfusion Team April 18, 2019 08:09 AM UTC

Hi Victor,

Thanks for the update.

As we updated earlier, we will provide you the analyzed details of the reported problem on April 26, 2019. In the meantime, we suggest you to apply the Office365 theme only once in your application either designer or code behind to resolve the reported issue.

We appreciate your patience until then.

Regards,
Jagadeesan



JA José António November 29, 2019 12:34 PM UTC


There is some news about this issue?


VR Vijayalakshmi Roopkumar Syncfusion Team December 2, 2019 12:12 PM UTC

Hi Jose,

Thank you for using Syncfusion Products,

We have checked the reported issue “Windows turns black on using ApplyStylesOnApplication property” with SfSkinManager and confirmed it is a defect. We have logged a defect report on this and the patch for this fix is estimated to be available on 18th December 2019.

You can track the status of this defect using the following feedback link:

Link:  https://www.syncfusion.com/feedback/10529/windows-turns-black-on-using-applystylesonapplication-property-of-sfskinmanager

Regards

Vijayalakshmi V.R



GS Gokul Sainarayanan Syncfusion Team January 31, 2020 06:26 AM UTC

Hi Jose,

We are glad to announce that our Essential Studio Volume 4 SP 1 2019 (v17.4.0.46) is rolled out and is available for download under the following link. In this release, we have included the fix for the reported “Windows turns black on using ApplyStylesOnApplication property” with SfSkinManager.

https://www.syncfusion.com/forums/151087/essential-studio-2019-volume-4-service-pack-release-v17-4-0-46-is-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Gokul S

Loader.
Live Chat Icon For mobile
Up arrow icon