在左而不是权WPF子菜单项打开 [英] WPF Sub-MenuItem Opening on the Left Instead of the Right
问题描述
我已经建立了一个简单的示例菜单。
I have set up a simple sample menu.
<Menu>
<MenuItem Header="Top Menu">
<MenuItem Header="Item 1">
<MenuItem Header="Sub Menu 2" />
</MenuItem>
</MenuItem>
</Menu>
子菜单2开在左侧,而不是预期右侧的菜单。我希望这种行为如果菜单是在屏幕的边缘附近,但窗口集中在屏幕上,而不是靠近任何优势。
Sub Menu 2 is opening on the left instead of the expected right side of the menu. I would expect this behaviour if the menu was near the edge of the screen, but window is centered on the screen and not near any edge.
有一个控制,其中一个菜单项
打开屏幕上的财产?
Is there a property that controls where a MenuItem
opens on the screen?
推荐答案
这是否会发生在你的系统上的其他应用程序呢?
Does this happen on other applications on your system as well?
有一个在 MenuDropAlignment
的关键值的注册表设置 HKEY_CURRENT_USER \软件\微软\的Windows NT \ CURRENTVERSION \ Windows下
控制它的全系统。你可能只是检查,以确保它被设置为0而不是1。
There's a registry setting in the value MenuDropAlignment
in the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
that controls it system-wide. You might just check to make sure that it is set to 0 instead of 1.
更多信息,可以发现本文中一>
这篇关于在左而不是权WPF子菜单项打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!