问题:笔者在VS2017中,WPF添加ResourceDictionary后,遇到【The Property "Resource" can only be set once】错误。
在App.xaml中包含resource dictionary的xaml后,如果还写了其他的style就会遇到这个问题。
解决方法:将其他的Style都移动到resource dictionary的xaml中去。
问题:笔者在VS2017中,WPF添加ResourceDictionary后,遇到【The Property "Resource" can only be set once】错误。
在App.xaml中包含resource dictionary的xaml后,如果还写了其他的style就会遇到这个问题。
解决方法:将其他的Style都移动到resource dictionary的xaml中去。