WPF - 不同操作系统上相同样式的上下文菜单
有没有办法强制 ContextMenu
在每个操作系统(Windows XP Win7 Windows Vista)中看起来都一样?
我在 Windows XP 上安装了我的小应用程序,ContextMenu
看起来与我预期的完全不同。看来ContextMenu
的外观是从Windows风格或类似的东西中获得的。那么有什么方法可以强制这个 ContextMenu 获得我想要的样式吗?
也许有人有一个好看的 ContextMenu
样式(在 XAML 中)。
Is there any way to force a ContextMenu
to look the same in every operation system (Windows XP Win7 Windows Vista)?
I installed my small application on windows xp and the ContextMenu
looks totaly different than I expected. It seems thatthe ContextMenu
gets its look from windows style or something like that. So is there any way to force this ContextMenu
to get the style which I want?
Maybe somebody has a good looking style for ContextMenu
(in XAML).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,请参阅此处。基本上,您需要显式加载正确的主题,在本例中是PresentationFramework.Aero.dll//themes/aero.normalcolor.xaml。
Yes, see for instance here. Basically you need to explicitly load the correct theme, which is in this case PresentationFramework.Aero.dll//themes/aero.normalcolor.xaml .