ResourceDictionary.MergedDictionaries doesn't allow x:Shared RRS feed

  • Question

  • When I create a Resource dictionary with a Merged dictionary I'm unable to use x:Shared as expected:

    <ResourceDictionary xmlns=""




                <StackPanel x:Key="content" x:Shared="false">

                    <TextBlock Text="From Ribbon" />






    This results in a XamlParseException: Shared attribute in namespace '' can be used only in compiled resource dictionaries.

    This is a compiled resource dictionary.  Why doesn't this code work?
    Wednesday, November 26, 2008 7:20 PM


  • I'm guessing because this isn't a compiled resource dictionary. It's a resource dictionary within a compiled resource dictionary.
    Controls for WPF and Windows Forms at
    • Marked as answer by Marco Zhou Monday, December 1, 2008 2:57 AM
    Wednesday, November 26, 2008 7:28 PM