2013-03-15 94 views
4

此代码提示的XamlParseException:可延迟内容XAML

'设置属性 'System.Windows.ResourceDictionary.DeferrableContent' 引发了异常。'行号“15”和线位置“14”

<UserControl x:Class="MyView.MainWindow" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
     xmlns:bv="clr-namespace:MyModel.FaultLibrary;assembly=Controller" 
     xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
     xmlns:i18n="http://wpflocalizeextension.codeplex.com" 
     i18n:LocalizeDictionary.DesignCulture="en" 
     i18n:ResxLocalizationProvider.DefaultAssembly="MyView" 
     i18n:ResxLocalizationProvider.DefaultDictionary="I18n" 
     xmlns:gif="http://wpfanimatedgif.codeplex.com" 
     mc:Ignorable="d" 
     d:DesignHeight="448" d:DesignWidth="955" FontFamily="Arial" 
     TextOptions.TextFormattingMode="Display" 
     SnapsToDevicePixels="True" 
     UseLayoutRounding="True"> 

设置InnerException:

项目已添加。重点在词典: 'DataTemplateKey(MyModel.FaultLibrary.TestPoint)' 键被添加: 'DataTemplateKey(MyModel.FaultLibrary.TestPoint)'

我不知道为什么......

感谢您的帮助。

+2

见http://blog.saraf.me/2011/02/set-property-threw-exception.html – 2013-03-15 14:55:19

+0

和** **的InnerException? – paul 2013-03-15 15:01:57

+0

我已经尝试重建我的解决方案,但它不为我工作,我没有找到任何重复。 – Shuyuntake 2013-03-15 15:06:24

回答

2

似乎有一些样式/模板,似乎有相同的密钥,否则,某些元素有多种样式设置。检查您的资源和资源库。