码迷,mamicode.com
首页 > Windows程序 > 详细

WPF在win7运行时报'Initialization of 'System.Windows.Setter' threw an exception.'

时间:2017-06-24 17:19:20      阅读:499      评论:0      收藏:0      [点我收藏+]

标签:ace   dll   system   运行时   XML   themes   sof   window   style   

写的一个WPF程序,在win10运行好好的,在win7就报‘Initialization of ‘System.Windows.Setter‘ threw an exception.‘

原来是xaml使用了xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"

并且dll引用了PresentationFramework.Aero2

那么只要改为

xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

dll引用改为PresentationFramework.Aero,就可以兼容win7了

WPF在win7运行时报'Initialization of 'System.Windows.Setter' threw an exception.'

标签:ace   dll   system   运行时   XML   themes   sof   window   style   

原文地址:http://www.cnblogs.com/IWings/p/7073713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!