为什么我要在ContentControl上将IsTabStop设置为true?

编程入门 行业动态 更新时间:2024-10-25 21:19:56
本文介绍了为什么我要在ContentControl上将IsTabStop设置为true?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 给定以下内容:
  • 在ContentControl上将IsTabStop设置为false将不会阻止其内容充当制表位。

    li>
  • 将IsTabStop设置为true会导致在您的应用程序中无法看到的制表符停止位置

    我有以下两个问题:

  • 为什么IsTabStop默认为ContentControl为真
  • 为什么我要把ControlControl作为一个制表符?
  • 解决方案

    是正确 ContentControl 从 Control 只是继承了 IsTabStop 的默认值>。也没有理由认为 true 对于 ContentControl 的有效性比对 Control 。

    例如,你可能有一个控件,它的内容应该是图形的,例如 Shape 元素或者图片。但是,当用户按下特定的按键时,您的控件可能会对内容执行某些操作。

    Given the following:

    • setting IsTabStop to false on a ContentControl will not prevent its content from acting as a tab-stop
    • setting IsTabStop to true will result in an invisible tab-stop, which does nothing, in your application

    I have the following two questions:

  • Why is IsTabStop true by default for the ContentControl
  • Why would I ever want the ControlControl to act as a tab-stop?
  • 解决方案

    Douglas is correct ContentControl simply inherits the default value of IsTabStop from Control. Also there is no good reason to assume that the value of true is less valid for a ContentControl than it is for Control.

    For example, you might have a control that expects its content be something graphical such a set of Shape elements or an Image. However your control may perform certain operations on the content when the user presses specific keys.

更多推荐

为什么我要在ContentControl上将IsTabStop设置为true?

本文发布于:2023-11-24 21:21:42,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:要在   设置为   上将   true   ContentControl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!