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

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

    1. <legend id='P8L9Y'><style id='P8L9Y'><dir id='P8L9Y'><q id='P8L9Y'></q></dir></style></legend>
      <tfoot id='P8L9Y'></tfoot>
      • <bdo id='P8L9Y'></bdo><ul id='P8L9Y'></ul>
    2. <small id='P8L9Y'></small><noframes id='P8L9Y'>

      1. WPF TabControl On SelectionChanged,將焦點設(shè)置到文本字

        WPF TabControl On SelectionChanged, set focus to a text field(WPF TabControl On SelectionChanged,將焦點設(shè)置到文本字段)
                <bdo id='2AWQW'></bdo><ul id='2AWQW'></ul>
              • <small id='2AWQW'></small><noframes id='2AWQW'>

                <tfoot id='2AWQW'></tfoot>

                    <tbody id='2AWQW'></tbody>

                  <legend id='2AWQW'><style id='2AWQW'><dir id='2AWQW'><q id='2AWQW'></q></dir></style></legend>

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

                  本文介紹了WPF TabControl On SelectionChanged,將焦點設(shè)置到文本字段的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個選項卡控件和一些選項卡項.我正在成功監(jiān)聽 SelectionChanged 事件,并檢查我感興趣的選項卡是否是當(dāng)前選定的選項卡.

                  I have a tab control, and a few tab items. I am successfully listening to the SelectionChanged event, and checking if the tab I'm interested in is the currently selected one.

                  我正在使用這段代碼(如下),并逐步通過調(diào)試器,我可以看到我的分支邏輯按設(shè)計工作;但是,我遇到的問題是某些東西覆蓋了對 txt.Focus() 的調(diào)用,因為在顯示正確的選項卡項后,焦點不在文本框上.

                  I'm using this code (below), and stepping through the debugger, I can see that my branching logic works as designed; however, the issue I'm having is that something is overriding this call to txt.Focus() because after the correct tab item is displayed, the focus is not on the text box.

                  private void tabMain_SelectionChanged(object sender, SelectionChangedEventArgs e)
                  {
                      // exact same behavior with and without this line
                      e.Handled = true;
                  
                      if (e.AddedItems.Contains(usrTab))
                      {
                          txtusr.Focus();
                      }
                      else if (e.AddedItems.Contains(svcTab))
                      {
                          txtsvc.Focus();
                      }
                  }
                  

                  如果我只是將 txtusr.Focus() 放在按鈕事件處理程序中,它會完全按照我的預(yù)期聚焦.

                  If I just put txtusr.Focus() in a button event handler, it focuses exactly as I'd expect.

                  我懷疑這與調(diào)用 .Focus() 方法時未加載 tabitem 內(nèi)容有關(guān),但我不確定如何修復(fù)它.

                  I suspect that this has to do with the tabitem content not being loaded at the time the .Focus() method is called, but I'm not sure how to go about fixing it.

                  推薦答案

                  嘗試將 .Focus() 調(diào)用放在 dispatcher.BeginInvoke 中.

                  Try putting the .Focus() calls inside a dispatcher.BeginInvoke.

                  Dispatcher.BeginInvoke(new Action(() => { txtsvc.Focus(); }));
                  

                  這篇關(guān)于WPF TabControl On SelectionChanged,將焦點設(shè)置到文本字段的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                    <tfoot id='R5g32'></tfoot>

                      • <bdo id='R5g32'></bdo><ul id='R5g32'></ul>
                            <tbody id='R5g32'></tbody>
                            <legend id='R5g32'><style id='R5g32'><dir id='R5g32'><q id='R5g32'></q></dir></style></legend>
                          • <small id='R5g32'></small><noframes id='R5g32'>

                          • <i id='R5g32'><tr id='R5g32'><dt id='R5g32'><q id='R5g32'><span id='R5g32'><b id='R5g32'><form id='R5g32'><ins id='R5g32'></ins><ul id='R5g32'></ul><sub id='R5g32'></sub></form><legend id='R5g32'></legend><bdo id='R5g32'><pre id='R5g32'><center id='R5g32'></center></pre></bdo></b><th id='R5g32'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='R5g32'><tfoot id='R5g32'></tfoot><dl id='R5g32'><fieldset id='R5g32'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 中文字幕免费在线 | 在线观看免费黄色片 | 中文字幕日韩欧美一区二区三区 | 久久精品av麻豆的观看方式 | 日韩福利视频 | 亚洲成人一区二区三区 | 特级黄色毛片 | 一级无毛片 | 激情五月婷婷在线 | 精品国产精品 | 欧美一区二区 | 日韩精品在线看 | 欧美中文字幕一区二区 | 日韩成人性视频 | 国产精品色 | 欧美日韩在线视频一区 | 91精品久久久久久久久中文字幕 | 日韩精品一区二区三区 | 欧美一区二区三区在线观看 | 日韩欧美在线视频观看 | 中文字幕综合 | 在线观看国产精品视频 | 亚洲国产一区二区视频 | 久久久久一区二区三区 | 99久久精品一区二区毛片吞精 | 色婷婷国产精品 | 我我色综合 | 欧洲在线视频 | 欧美一级做性受免费大片免费 | 黄色免费网站在线看 | 999久久久久久久久 国产欧美在线观看 | 久久久久久精 | 亚洲系列第一页 | wwwxx在线观看 | 欧美性tv| 日本久久久久久 | 2019中文字幕视频 | 日韩在线中文字幕 | 老外黄色一级片 | 完全免费在线视频 | 欧美激情综合色综合啪啪五月 |