0
현재 작업중인 Silverlight 프로젝트에서 ExpressionDark 테마를 사용하고 있습니다. 디버깅 할 때 예외가 발생하는 문제가 있습니다.Silverlight에서 ExpressionDark를 사용할 때 XamlParseException이 발생했습니다.
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.dll
Additional information: Invalid attribute value dataForm:DataForm for property TargetType. [Line: 1 Position: 233]
이것은 여전히 효과가 있기 때문에 아무런 영향을주지 않습니다. 그냥 성가신 것입니다. 다음은 코드 예제입니다.
<UserControl x:Class="MyProject.Controls.Test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:expressionDark="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<expressionDark:ExpressionDarkTheme ApplyMode="Auto" Background="#00000000">
<Grid x:Name="LayoutRoot" Background="#00000000">
</Grid>
</expressionDark:ExpressionDarkTheme>
</UserControl>
expressionDark 행을 주석 처리하면 예외가 사라집니다. 예외를 수정하거나 어떻게 든 무시하는 방법에 대한 아이디어?
이 방향으로 나를 안내해 주셔서 감사합니다. 예외를 제거하기위한 네임 스페이스를 추가 할 필요가 없었습니다. 어쨌든 이것을 포함시켜야합니까? 방금 System.Windows.Controls.Data.DataForm.Toolkit에 대한 참조를 추가하고이를 수정했습니다. – thecaptain0220
@ thecaptain0220 아니오; 네임 스페이스를 추가 할 필요가 없습니다. 명시 적으로 UserControl 내에서 사용하지 않는 한 –