是否可以在 Windows Embedded Standard 7 上使用 Windows 7 默认主题(例如 Windows 7 Basic)?如果是这样,如何?
我相信主题包括通用控件样式,即它们为您的进度条提供“Aero”外观,而不是经典的 Windows 95 风格。
我的问题的上下文是 WPF 应用程序从 Windows 7 工作站迁移到 Windows Embedded Standard 7 嵌入式设备。
没关系,解决方法如下:
Uri uri = new Uri("PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\themes/aero.normalcolor.xaml", UriKind.Relative);
Resources.MergedDictionaries.Add(Application.LoadComponent(uri) as ResourceDictionary);
有一篇关于该主题的博客文章
http://arbel.net/blog/archive/2006/11/03/Forcing-WPF-to-use-a-specific-Windows-theme.aspx