WPF - 不同操作系统上相同样式的上下文菜单

发布于 2024-09-19 00:27:39 字数 304 浏览 3 评论 0原文

有没有办法强制 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍风燃霜 2024-09-26 00:27:39

是的,请参阅此处。基本上,您需要显式加载正确的主题,在本例中是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 .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文