我遇到了以下错误:
属性“Resources”被设置了多次。
这是我的XAML:
<UserControl.Resources>
<!--Resource dictionaries for framework stuff-->
<ResourceDictionary>
<Style x:Key="MultiLineTextBox" TargetType="TextBox">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="TextWrapping" Value="WrapWithOverflow"/>
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/View;component/Common/ResourceDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<!--Convertors needed for proper display-->
<c:CollapsedIfNegative x:Key="CollapseIfNegative"/>
<c:VisibleIfNegative x:Key="MakeVisibleIfNegative"/>
<c:ErrorCodeToString x:Key="ConvertErrorCodeToString"/>
</UserControl.Resources>
ResourceDictionary
中。我认为MergedDictionaries
元素必须是第一个或最后一个,但除此之外顺序并不重要。 - Dan Puzey