C# VS 2013:XAML编辑器中的Intellisense不使用外部资源字典?

C# VS 2013:XAML编辑器中的Intellisense不使用外部资源字典?,c#,wpf,xaml,intellisense,visual-studio-2013,C#,Wpf,Xaml,Intellisense,Visual Studio 2013,我最近安装了Visual Studio 2013。VisualStudio的新功能之一是对XAML资源的Intellisense支持。Intellisense似乎只适用于直接在我的项目中定义的资源 我的项目的App.xaml示例: <Application.Resources> <ResourceDictionary> <SolidColorBrush x:Key="someColor" Color="Black"/>

我最近安装了Visual Studio 2013。VisualStudio的新功能之一是对XAML资源的Intellisense支持。Intellisense似乎只适用于直接在我的项目中定义的资源

我的项目的App.xaml示例:

<Application.Resources>    
    <ResourceDictionary>
        <SolidColorBrush x:Key="someColor" Color="Black"/>
        <ResourceDictionary.MergedDictionaries>                
            <ResourceDictionary Source="/MyComponent;component/MyXamlResources.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

在项目的MainWindow.xaml中使用资源的示例:

<Window x:Class="XamlTest1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ctl="clr-namespace:MyComponent;assembly=MyComponent"
    Title="MainWindow" Height="350" Width="525"        
    Background="{StaticResource someColor}">    

正如您在App.xaml的代码片段中所看到的,有一种颜色直接定义了键“someColor”。此外,我引用了一个编译过的DLL,它提供了更多的颜色定义

在XAML编辑器中,Intellisense可以很好地使用键“someColor”。我的问题是“MyComponent”/“MyXamlResources.xaml”中定义的所有颜色都不能与Intellisense一起使用,但我可以在我的项目中使用它们

我的问题是,如果你有这个功能正常工作,如果你有任何想法如何解决这个问题。也许这是Visual Studio 2013中的一个bug


非常感谢您的帮助。

Intellisense已经在VS2010上为我提供了资源,即使是来自不同项目的合并词典(至少是resharper)。虽然我有一个类似的问题,并将感谢Being指导解决方案。在App.xaml中合并所有必需的资源(来自不同项目)可提供对我常用资源的全局访问,但intellisense拒绝显示其中任何资源。此问题可能是由于程序集不受信任所致。请看这个答案:-