久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='8FrDp'></bdo><ul id='8FrDp'></ul>

    <tfoot id='8FrDp'></tfoot>
    1. <small id='8FrDp'></small><noframes id='8FrDp'>

      <i id='8FrDp'><tr id='8FrDp'><dt id='8FrDp'><q id='8FrDp'><span id='8FrDp'><b id='8FrDp'><form id='8FrDp'><ins id='8FrDp'></ins><ul id='8FrDp'></ul><sub id='8FrDp'></sub></form><legend id='8FrDp'></legend><bdo id='8FrDp'><pre id='8FrDp'><center id='8FrDp'></center></pre></bdo></b><th id='8FrDp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8FrDp'><tfoot id='8FrDp'></tfoot><dl id='8FrDp'><fieldset id='8FrDp'></fieldset></dl></div>
    2. <legend id='8FrDp'><style id='8FrDp'><dir id='8FrDp'><q id='8FrDp'></q></dir></style></legend>
    3. Shift+Tab 在 TreeView 控件中不起作用

      Shift+Tab not working in TreeView control(Shift+Tab 在 TreeView 控件中不起作用)

      <small id='WktBt'></small><noframes id='WktBt'>

      <i id='WktBt'><tr id='WktBt'><dt id='WktBt'><q id='WktBt'><span id='WktBt'><b id='WktBt'><form id='WktBt'><ins id='WktBt'></ins><ul id='WktBt'></ul><sub id='WktBt'></sub></form><legend id='WktBt'></legend><bdo id='WktBt'><pre id='WktBt'><center id='WktBt'></center></pre></bdo></b><th id='WktBt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WktBt'><tfoot id='WktBt'></tfoot><dl id='WktBt'><fieldset id='WktBt'></fieldset></dl></div>

      1. <tfoot id='WktBt'></tfoot>
          <bdo id='WktBt'></bdo><ul id='WktBt'></ul>
              <tbody id='WktBt'></tbody>
              <legend id='WktBt'><style id='WktBt'><dir id='WktBt'><q id='WktBt'></q></dir></style></legend>

              • 本文介紹了Shift+Tab 在 TreeView 控件中不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我無法使用 Shift+Tab 向后導(dǎo)航以在包含 TextBox 的 TreeView 中工作,使用 Tab 向前導(dǎo)航可以正常工作并在 TreeView 內(nèi)從 TextBox 跳轉(zhuǎn)到 TextBox.任何時候當 TreeView 內(nèi)的 TextBox 之一使用 Shift+Tab 時,焦點就會移到 TreeView 外的上一個控件,而不是 TreeView 內(nèi)的上一個控件.

                I cannot get backwards navigation using Shift+Tab to work in a TreeView that contains TextBoxs, forward navigation using Tab works fine and jump from TextBox to TextBox inside the TreeView. Anytime Shift+Tab is used when one of the TextBoxes inside the TreeView, then the focus is move to the previous control outside the TreeView, instead of the previous control inside the TreeView.

                此外,它唯一無法正常工作的 Shift+Tab 導(dǎo)航,Ctrl+Shift+Tab 按預(yù)期工作并按正確順序工作.

                Also its only Shift+Tab navigation that are not working correctly, Ctrl+Shift+Tab work as expected and in the correct order.

                對我做錯了什么有什么建議嗎?

                Any suggestions to what I'm doing wrong?

                示例代碼:

                <Window x:Class="TestTabTreeView.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    Title="MainWindow" Height="350" Width="525">
                
                <Window.Resources>
                    <Style TargetType="TreeViewItem">
                        <Setter Property="KeyboardNavigation.TabNavigation" Value="Continue" />
                    </Style>
                </Window.Resources>
                
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                
                    <TextBox Text="First Line" Grid.Row="0" />
                
                    <TreeView Grid.Row="1" KeyboardNavigation.TabNavigation="Continue" IsTabStop="False">           
                        <TreeViewItem IsExpanded="True"><TreeViewItem.Header><TextBox Text="Popular Words"/></TreeViewItem.Header>
                            <TreeViewItem><TreeViewItem.Header><TextBox Text="Foo"/></TreeViewItem.Header></TreeViewItem>
                            <TreeViewItem><TreeViewItem.Header><TextBox Text="Bar"/></TreeViewItem.Header></TreeViewItem>
                            <TreeViewItem><TreeViewItem.Header><TextBox Text="Hello"/></TreeViewItem.Header></TreeViewItem>
                        </TreeViewItem>
                        <TreeViewItem IsExpanded="True"><TreeViewItem.Header><TextBox Text="Unpopular Words"/></TreeViewItem.Header>
                            <TreeViewItem><TreeViewItem.Header><TextBox Text="Work"/></TreeViewItem.Header></TreeViewItem>
                            <TreeViewItem><TreeViewItem.Header><TextBox Text="Duplication"/></TreeViewItem.Header></TreeViewItem>
                        </TreeViewItem>
                    </TreeView>
                
                    <TextBox Text="Last Line" Grid.Row="2" />
                </Grid>
                

                推薦答案

                如果您使用 ILSpy/Reflector 查看 TreeView.OnKeyDown 處理程序,您可以看到問題的原因.當按下 Shift+Tab 時,TreeView 有特殊處理.相關(guān)代碼為:

                If you look in the TreeView.OnKeyDown handler using ILSpy/Reflector, you can see the cause of your issues. The TreeView has special handling when Shift+Tab is pressed. The relevant code is:

                Key key = e.Key;
                if (key != Key.Tab) {
                    // ... 
                }
                else {
                    if (TreeView.IsShiftKeyDown && base.IsKeyboardFocusWithin &&
                        this.MoveFocus(new TraversalRequest(FocusNavigationDirection.Previous))) {
                        e.Handled = true;
                        return;
                    }
                }
                

                不幸的是,您需要使用自定義 TreeView 類來解決此問題.這樣的工作:

                Unfortunately, you'd need to use a custom TreeView class to work around this. Something like this works:

                public class MyTreeView : TreeView {
                    protected override void OnKeyDown(KeyEventArgs e) {
                        if ((Keyboard.Modifiers & ModifierKeys.Shift) != 0 && e.Key == Key.Tab)
                            return;
                
                        base.OnKeyDown(e);
                    }
                }
                

                這篇關(guān)于Shift+Tab 在 TreeView 控件中不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)

                      <legend id='ZWgEi'><style id='ZWgEi'><dir id='ZWgEi'><q id='ZWgEi'></q></dir></style></legend>
                      <i id='ZWgEi'><tr id='ZWgEi'><dt id='ZWgEi'><q id='ZWgEi'><span id='ZWgEi'><b id='ZWgEi'><form id='ZWgEi'><ins id='ZWgEi'></ins><ul id='ZWgEi'></ul><sub id='ZWgEi'></sub></form><legend id='ZWgEi'></legend><bdo id='ZWgEi'><pre id='ZWgEi'><center id='ZWgEi'></center></pre></bdo></b><th id='ZWgEi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZWgEi'><tfoot id='ZWgEi'></tfoot><dl id='ZWgEi'><fieldset id='ZWgEi'></fieldset></dl></div>

                      <tfoot id='ZWgEi'></tfoot>

                      <small id='ZWgEi'></small><noframes id='ZWgEi'>

                        • <bdo id='ZWgEi'></bdo><ul id='ZWgEi'></ul>
                            <tbody id='ZWgEi'></tbody>
                          主站蜘蛛池模板: 久久久精选 | 精品久久久久久亚洲国产800 | 一区二区在线 | 在线欧美视频 | a级在线免费观看 | 丝袜天堂 | 日本公妇乱淫xxxⅹ 国产在线不卡 | 亚洲精品久久久久久下一站 | 黄色网毛片 | 一级大片| 国产精品中文 | 欧美中文字幕 | www.成人.com | 91资源在线 | 91国产精品在线 | 中文字幕 在线观看 | 日韩av在线一区 | 国产精品夜色一区二区三区 | 一级毛片视频 | 欧美性一区二区三区 | 久久91精品国产 | 99国产精品视频免费观看一公开 | 日韩欧美精品 | 亚洲a在线视频 | 亚洲精品日韩一区二区电影 | 日韩在线一区二区 | 妞干网视频| 欧产日产国产精品视频 | 国产免费拔擦拔擦8x高清 | 日韩综合网 | 国产精品久久久久久久久免费丝袜 | 午夜影视在线观看 | 亚洲国产一区二区视频 | 国产高清在线精品 | 精品婷婷 | 狠狠综合久久av一区二区老牛 | 欧美福利专区 | 麻豆久久久久久久久久 | 亚洲精品视频在线观看视频 | 中文字幕人成乱码在线观看 | 国产精品视频500部 a久久 |