访问键有时无法使用 [英] Access keys does not work sometime

查看:105
本文介绍了访问键有时无法使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在研究WPF应用程序。

在其中一个XAML中,我们有一个Custom UserControl,后跟一个listview。

我为Listview项添加了ContextMenu。每个上下文菜单项都有访问键(即删除...它是_Remove,因此它将显示为 R emove 这里R是一个访问密钥)

当我点击列表视图中的任何项目然后按键盘上的右键单击按钮时,会出现上下文菜单,我可以借助箭头键浏览它。



但是当我尝试使用Access键执行此操作时,没有任何反应。我对多种类型的数据使用相同的XAML。第一个CustomUserControl缺席的地方(即禁用和隐藏)Acess键工作正常。



我尝试使用

Hi,

I am working on a WPF application.
In one of the XAML, we have a Custom UserControl followed by a listview.
I have added a ContextMenu for Listview items. Each context menu item has access key (i.e. for Remove... it is _Remove so that it will appear as Remove Here R is an access key )
When i click on any item in the Listview and then press right click button on the keyboard, Context menu appears and i can navigate through it with the help of arrow keys.

But when i tried to do this using Access keys, nothing happens . I use same XAML for multiple type of data. Wherever the first CustomUserControl is absent (i.e. disabled and hided ) Acess keys work fine.

I tried with making

Focusable=false

用于自定义用户控件。在这种情况下,它适用于更多屏幕但不适用于所有屏幕。



我分析的是重点问题。是否有任何简单的解决方案。

for the custom user control. In this case it works for some more screens but not for all.

What i analyzed is it is an issue with the focus. Is there any simple solution to it.

推荐答案

那么为什么不在所有其他人面前添加假的CustomUserControl并禁用和隐藏那个?这是一个讨厌的解决方案,但似乎没有人知道更好的解决方案: - )
So why don't you add a fake CustomUserControl in front of all others and disable and hide that one? It's a nasty solution, but noone here seems to know a better one :-)


这篇关于访问键有时无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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