所有 WPF 控件都可聚焦吗?
wpf 控件是否存在不可聚焦的默认异常?
我的控件需要全部可聚焦,但我不想每次创建控件时都进行设置
make focusable="true"
Are there any default exceptions where wpf controls are not focusable?
My controls need to be all focusable, but I do not want to set everytime I create a control
make focusable="true"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,WPF 控件在是否可聚焦方面按预期工作。您可以与之交互的东西,例如按钮、列表/项目控件、文本框都是可聚焦的。像 TextBlock、Image 这样的非交互式控件是不可聚焦的。因此,通常情况下,您不必处理设置 Focusable 属性的值。我不确定这是否是您正在寻找的内容,但我希望这会有所帮助。
In general, WPF controls work as expected with regards to being focusable or not. Things you can interact with such as button, list/items controls, textbox are all focusable. Non-interactive controls like TextBlock, Image are non-focusable. So normally, you don't have to deal with setting the value of the Focusable property. I'm not sure if this is what you're looking for but I hope this helps.