WPF菜单显示在窗口的左侧 [英] WPF Menu displays to the left of the window

查看:848
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆