We found a workaround. When loading the WPF Fluent Ribbon application using the declaration:
Fluent.Sample.KeyTips.Window w = new Fluent.Sample.KeyTips.Window()
The application-level resources do not get created. If by default the implementation of the ResourceDictionary/Theme is in the application level. By calling w.ShowDialog() the application resource is not created and not available during
the InitializeComponent process of the window. This causes the error.
Alternatively, when the ResourceDictionary/Theme is loaded as a part of the xaml window, the ResourceDictionary/Theme is also
the InitializeComponent process and again the error occurs.
A solution, based on an article from Dr. WPF - Managing Application Resources when WPF is Hosted, helped to resolve this issue. While the article is not really on-point, it does have good
tips and an explaination of why ResourceDictionary elements are not available. (http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/).
Following the article, to ensure that the Application level Resources are available, we modified the Window.cs to include the EnsureApplicationResources() function and called the function before InitializeComponent().
Please note: LoadComponent cannot accept the pack attribute "pack://application:,,," This was removed to allow the component to load.
public partial class Window : RibbonWindow
/// <summary> /// Default constructor
public static void EnsureApplicationResources()
if (Application.Current == null)
Application.Current.Resources.MergedDictionaries.Add (Application.LoadComponent (new Uri ("/Fluent;Component/Themes/Office2010/Black.xaml", UriKind.RelativeOrAbsolute )) as System.Windows.ResourceDictionary );