我已经完成了.Net开发一段时间,但我是WPF技术的新手.App.xaml的假设目的是什么?另外,您通常会在其中添加什么类型的xaml代码?对于简单的应用程序来说,它似乎可以被忽略并保持不变.这是真的?
创建一个名为的新WPF项目: xmlnsError
添加引用 PresentationFramework.Aero
将此添加ResourceDictionary到App.xaml:
<ResourceDictionary Source="/PresentationFramework.Aero,Version=4.0.0.0,Culture=Neutral,PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL;component/themes/Aero.NormalColor.xaml"/>
Run Code Online (Sandbox Code Playgroud)
这样做会显示警告
Assembly 'PresentationFramework.Aero,Version=4.0.0.0,Culture=Neutral,PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL' is not referenced by this project
Run Code Online (Sandbox Code Playgroud)
我已经仔细检查以确保版本实际上4.0.0.0并且PublicKeyToken实际上是31bf3856ad364e35通过导航到C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework.Aero以及在运行时通过查看来自的AssemblyInfo来检查GACAppDomain.CurrentDomain.GetAssemblies();
有没有办法解决这个警告?这是WPF Windows 8兼容性问题的后续问题