如何停止在WPF中聚焦网格或面板 [英] How to stop focusing grid or panels in WPF

查看:103
本文介绍了如何停止在WPF中聚焦网格或面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在多个面板下有多个控件,例如StackPanel,Grid等。



我按Tab键选项卡焦点应移动到容器内的控件,而是它通过矩形虚线突出显示面板或网格。



请为我提供解决此问题的解决方案。



我尝试过:



尝试使用

I am having multiple controls under multiple panels such as StackPanel,Grid etc.

It I press tab tab focus should move to the control inside the container but instead it highlighting the Panel or Grid by rectangular Dotted lines.

Kindly provide me a solution to get rid of this issue.

What I have tried:

Tried using

IsTabStop="False"

但它不适用于Panel

but its not working for Panels

推荐答案

可聚焦的东西将具有.Focusable属性;在适用的情况下将它(和.TabStop)设置为false。
Something that is "focusable" will have a ".Focusable" property; set it (and .TabStop) to "false" where applicable.


这篇关于如何停止在WPF中聚焦网格或面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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