Application.Resource in Expression Blend 4 RC : Is this a bug or not? RRS feed

  • Question

  • I was trying to use both localization and a resource dictionary in the Application.Resources section of my App.Xaml file. I am using the resource dictionary for control styles. Everything compiles and works as expected. This error message come up in the Blend 4 designer, which is a release candidate. I am wondering whether this is a bug or in fact the Application.Resources only supports one resource which I find hard to believe. Has anyone else experienced this issue?

    This is the error message I get. 

    The property "Resources" can only be set once.

    I also get the following error on the localization resource which is the second node in Application.Resources.

    The "Key" attribute can only be used on an element that is contain in "IDictionary".

    1    <Application.Resources>
    3    	<ResourceDictionary x:Key="ResourceDictionary">
    4    		<ResourceDictionary.MergedDictionaries>
    5    			<ResourceDictionary Source="ResourceDictionary.xaml"/>
    6    		</ResourceDictionary.MergedDictionaries>
    7    	</ResourceDictionary>
    8      <Localization:ApplicationResources x:Key="Localization" ></Localization:ApplicationResources>
    9    </Application.Resources>

    Friday, May 21, 2010 5:47 PM