更好的方法应该是将4.0.30319放在2.0.50727前面,这样会优先匹配.NET 4.x:
如果不这样做的话,在Win8/8.1/10中运行会将控件显示为Win7样式。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup uselegacyv2runtimeactivationpolicy="true">
<supportedruntime version="v4.0.30319">
<supportedruntime version="v2.0.50727">
</supportedruntime></supportedruntime></startup>
</configuration>如果不这样做的话,在Win8/8.1/10中运行会将控件显示为Win7样式。