WPF 菜单显示在窗口的左侧 [英] WPF Menu displays to the left of the window
本文介绍了WPF 菜单显示在窗口的左侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 DockPanel 中有一个简单的菜单.这是 XAML:
I have a simple Menu in a DockPanel. Here is the XAML:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Name="file" Header="_File">
<MenuItem Name="exitMenuItem" Header="E_xit"/>
</MenuItem>
</Menu>
<Grid>
</Grid>
</DockPanel>
为什么像大多数应用程序一样,菜单下拉到窗口边框的左侧而不是右侧?
Why does the Menu drop down to the left instead of the right of the window border like most applications?
推荐答案
您似乎有一台平板电脑输入设备.按照此链接中的说明更改 Tablet PC 设置中的惯用手:
It appears that you have a tablet input device. Follow the instructions in this link to change the handedness in your Tablet PC Settings:
这篇关于WPF 菜单显示在窗口的左侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文