KeyboardNavigationMode Contained 和 Cycle 之间的区别?

发布于 2024-10-07 10:16:53 字数 280 浏览 2 评论 0原文

简短的问题 - 用简单易懂的语言表达的真正区别是什么?..

摘自 MSDN:

  • 包含 - 根据导航的方向,结束时焦点返回到第一项或最后一项或者到达容器的开头,但没有移过容器的开头或结尾。
  • 循环 - 根据导航方向,当到达容器的末尾或开头时,焦点将返回到第一个或最后一个项目。使用逻辑导航焦点无法离开容器。

不同之处在于这些模式描述的最后部分。但我无法理解。谁能用更人性化的方式解释一下?

Short question - what is the real difference put in easy and understandable words?..

Extracts from MSDN:

  • Contained - Depending on the direction of the navigation, focus returns to the first or the last item when the end or the beginning of the container is reached, but does not move past the beginning or end of the container.
  • Cycle - Depending on the direction of the navigation, the focus returns to the first or the last item when the end or the beginning of the container is reached. Focus cannot leave the container using logical navigation.

The difference is in the last part of the description of those modes. But I cannot understand it. Can anyone explain it in a more humane way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寻找一个思念的角度 2024-10-14 10:16:53

KeyboardNavigation 类定义了三个附加属性,允许修改每种导航模式:

KeyboardNavigation.TabNavigation、
KeyboardNavigation.DirectionalNavigation,
KeyboardNavigation.ControlTabNavigation

每个属性都定义了六个可能的值。这些值指定如何在列表控件(例如:ListBox、listview)中完成导航

KeyboardNavigation.DirectionalNavigation="Contained"

用于指示当我按键盘中的向下或向上箭头在列表中的项目之间导航时,导航停止在最后一项或第一项,然后我们必须使用相反的按钮进一步向上或向下导航。

KeyboardNavigation.DirectionalNavigation="Cycle"

用于指示当我按键盘中的向下或向上箭头在列表中的项目之间导航时,导航以循环方式从顶部或底部项目继续,

与 TabNavigation 的情况相同,它指示我们时的导航模式按列表中的选项卡按钮

The KeyboardNavigation class defines three attached properties that allow the modification of each of the navigation modes:

KeyboardNavigation.TabNavigation,
KeyboardNavigation.DirectionalNavigation,
KeyboardNavigation.ControlTabNavigation

Each of these properties defines six possible values.These values specifies how the navigation can be done in a list control(eg:ListBox,listview)

for instance;

KeyboardNavigation.DirectionalNavigation="Contained"

is used to indicate that when i press the down or up arrow in the keyboard to navigate between items in a list,the navigation stops at the last item or first item,then we have to use the opposite button to navigate further up or down.

KeyboardNavigation.DirectionalNavigation="Cycle"

is used to indicate that when i press the down or up arrow in the keyboard to navigate between items in a list,the navigation continues from the top or bottom item in a cyclic manner

same is the case with TabNavigation which indicate the navigation mode when we press the tab button in a list

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文