【问题标题】:ResourceDictionary in MergedDictionaries Source causing VS 2012 Designer not to loadMergedDictionaries Source 中的 ResourceDictionary 导致 VS 2012 Designer 无法加载
【发布时间】:2012-12-01 02:17:13
【问题描述】:

ResourceDictionary Source=".​​.." 这行加了下划线,VS 设计器抛出异常。 VS 2008 中一切正常

<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MySolution.MyProject;component/Styles/MyStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

例外:

异常:值不能为空。参数名称:item(与 InnerException 相同) 在Microsoft.Expression.Platform.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateChildren(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, Boolean isNewInstance)

【问题讨论】:

    标签: xaml visual-studio-2012 resourcedictionary visual-studio-designer mergeddictionaries


    【解决方案1】:

    为您的 MyStyles.xaml 设置的“构建操作”是什么?

    如果还没有这样设置,请尝试将其设置为“页面”。

    有关详细信息,请参阅其他答案:(在我看来,这可能在某种程度上相关)

    Style TargetType causes XamlParseException when not attached to debugger

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-03
      • 2012-12-03
      • 2018-09-21
      • 1970-01-01
      • 2014-11-28
      • 1970-01-01
      相关资源
      最近更新 更多