WPF .xaml设计器异常

时间:2013-12-19 06:27:44

标签: c# wpf xaml visual-studio-2012 mahapps.metro

我正在开发WPF桌面应用程序,我在我的xaml设计器预览中收到此错误。我已经通过了许多链接,但无法弄明白。

在此之前也提出了同样的问题。 Unidentified Resource by the URI但是我仍然无法解决它。我还附上了下面的图片。

enter image description here

以下是完整错误:

Exception: The component 'Microsoft.Expression.Utility.ValueEditors.SplitComboBox' does not have a resource identified by the URI '/Microsoft.Expression.Utility;component/valueeditors/splitcombobox.xaml'.

而且,我正面临警告信息。 enter image description here

Warning 7   There was a mismatch between the processor architecture of the   project being built "MSIL" and the processor architecture of the reference "Microsoft.Expression.Utility, Version=5.0.30709.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.    Predictions Version 1

为了解决上述警告,我经历了link,但一切都是徒劳的。

程序运行正常,但我需要实现设计更改并观察更改,我必须一次又一次地运行程序,因为设计预览不起作用。

另请注意,当我包含 mahapps.metro 库时,它就会开始发生。 如果需要,我可以粘贴 .xaml 文件。我正在使用VS2012。 在此先感谢。

1 个答案:

答案 0 :(得分:1)

在我的情况下,删除下面的引用解决了这个问题。 我不知道哪一个引起了异常。

  • Microsoft.Expression.Blend
  • Microsoft.Expression.Interactions
  • System.Windows.Interactivity