为什么我会收到这个错误信息:
我相信所有的控件样式都设置得很好,但是 Visual Studio Designer 显示了这个错误!:'( 我确定代码没问题,也不想在你的浏览器屏幕上填满大量代码...
我看到这个错误很多次了,但是我不知道该如何调试它!如果你知道一些调试技巧,请帮忙!
编辑:
在 Player.xaml(UserControl) 中:
感谢您的提前支持... :)
'{DependencyProperty.UnsetValue}' is not a valid value for the 'System.Windows.Controls.Panel.Background' property on a Setter.
我相信所有的控件样式都设置得很好,但是 Visual Studio Designer 显示了这个错误!:'( 我确定代码没问题,也不想在你的浏览器屏幕上填满大量代码...
我看到这个错误很多次了,但是我不知道该如何调试它!如果你知道一些调试技巧,请帮忙!
编辑:
在 Player.xaml(UserControl) 中:
<Button Height="40" Name="btnNext" Style="{StaticResource ResourceKey=NextButton}" Click="btnNext_Click" />
在重新构建项目后,我发现在#的上一行出现了错误:-s。
在Constants.xaml文件中:
<ImageBrush x:Key="nextImage" ImageSource="../Images/next.png" />
在 Generic.xaml 中:
<Style TargetType="{x:Type Button}" x:Key="NextButton">
<Setter Property="Background" Value="{StaticResource ResourceKey=nextImage}" />
<Setter Property="Template" Value="{StaticResource ResourceKey=PlayerButtonTemplate}" />
</Style>
感谢您的提前支持... :)