RibbonWindow (HeaderItemsSource)

Hello, 

I'm currently experimenting with Window Ribbon. I've encountered a problem: as soon as I try to set a HeaderItemsSource and start the application, it throws an error.

I have also tried the other examples, but it's always the same issue.

Version: 28.2.9


<syncfusion:RibbonWindow x:Class="RR.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:listCollection="clr-namespace:System.Collections;assembly=mscorlib"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        xmlns:syncfusionskin= "clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
        syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=Windows11Light}"
        xmlns:editors="clr-namespace:Syncfusion.Windows.Controls.Input;assembly=Syncfusion.SfInput.Wpf"
        mc:Ignorable="d" Title="2025" ResizeMode="CanResize" AllowsTransparency="False" Icon="App.ico" ShowHelpButton="False" Height="800" Width="1200"
        Loaded="Window_Loaded" Closing="Window_Closing" TextOptions.TextFormattingMode="Display" PreviewKeyDown="Window_PreviewKeyDown">

    <syncfusion:RibbonWindow.HeaderItemsSource>
        <listCollection:ArrayList>
            <TextBox x:Name="textBox" Text="Search" Height="5" Width="100"/>
        </listCollection:ArrayList>
    </syncfusion:RibbonWindow.HeaderItemsSource>


Document
NameWertTyp
StackTrace" bei Syncfusion.Windows.Tools.Controls.TitleBar.TitleBar_SizeChanged(Object sender, SizeChangedEventArgs e)\r\n bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)\r\n bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)\r\n bei System.Windows.FrameworkElement.OnRenderSizeChanged(SizeChangedInfo sizeInfo)\r\n bei System.Windows.ContextLayoutManager.fireSizeChangedEvents()\r\n bei System.Windows.ContextLayoutManager.UpdateLayout()\r\n bei System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)\r\n bei System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)\r\n bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)\r\n bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)\r\n bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n bei MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)"string


3 Replies

SS Sekar Sivalingam Syncfusion Team March 10, 2025 06:09 AM UTC

Hi Matthias Wieland,

We have tested the reported issue on our end and were able to reproduce it only when no Ribbon control is assigned or initialized in the Loaded event in code-behind. However, when the Ribbon is initialized in XAML, we did not encounter the issue.

Could you please confirm whether your implementation matches our test scenario? If not, kindly provide additional code snippets showing how you are initializing the Ribbon on your end so we can further analyze the issue.

Looking forward to your response.

Regards,
Sekar Sivalingam



MW Matthias Wieland March 10, 2025 08:08 AM UTC

Hello,

thanks for the quick response. I just tested it, and it works! I'm using the RibbonWindow as the default window because Windows docking, etc., works very well here—better than with the ChromelessWindow.

The tab bar is hidden for me. 

Thanks!

Screenshot 2025-03-10 090501.png


Screenshot 2025-03-10 090433.png



SS Sekar Sivalingam Syncfusion Team March 10, 2025 10:23 AM UTC

Hi Matthias Wieland,

Thank you for your confirmation!

We're glad to hear that initializing the Ribbon in XAML resolved the issue for you.

If you have any further questions or need additional assistance, feel free to reach out. We're happy to help.

Regards,
Sekar Sivalingam


Loader.
Up arrow icon