解决:请检查ImageSource属性的路径是否正确(即便编译无错),请尝试将改属性项删除,再次调试html
<!--UI xaml 自身的样式--> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Dictionary.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> <!-- <Style TargetType="TextBlock"> -- 这段句会出问题,应使用下句--> <Style x:Key="TextBlockStyleDefault" TargetType="TextBlock"> <Setter Property="TextWrapping" Value="NoWrap"/> <Setter Property="TextTrimming" Value="None"/> <Setter Property="Margin" Value="10,10,0,0"/> <Setter Property="FontSize" Value="16"/> <Setter Property="Foreground" Value="#ccdffd"/> </Style> </ResourceDictionary> <!--UI xaml 控件引用--> <!--此时须要注明 Style 属性值--> <TextBlock Text="类型:" Style="{DynamicResource TextBlockStyleDefault}"/> <!--若是不将自身样式命名,则会影响到 "ComboBoxStyleQuery" 中文本的显示问题--> <ComboBox x:Name="cmbProviderName" SelectedValuePath="Value" Style="{DynamicResource ComboBoxStyleQuery}" Margin="0,0,0,0"/>