如何防止鼠标点击获得焦点? [英] How to prevent getting focus from mouse click?

查看:308
本文介绍了如何防止鼠标点击获得焦点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Windows应用程序中写道,以防止鼠标点击焦点,但我不能对wpf做同样的事情因为没有任何形式。所以我想要的是我在写屏幕键盘但每次鼠标点击获取焦点到wpf应用程序,我不希望焦点到任何按钮或我的窗口标题栏点击,但我希望他们正确地做鼠标点击功能。 (在Windows Vista中类似OSK)

任何答案非常有用。感谢您的关注。



I wrote in Windows froms application for prevent focus from mouse click but i cant do same to wpf because there isnt any form.
so what i want is i am writing On Screen Keyboard but every mouse click getting focus to wpf application , i dont want focus to any button or to my window title bar click but i want them to do mouse click function properly. ( similar OSK in windows Vista )

any answer very useful.
thank you for your interest.

推荐答案

您应该只必须在根页面或窗口上将Focusable设置为false。
You should only have to set Focusable to false on the root Page or Window.


这篇关于如何防止鼠标点击获得焦点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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