1. <legend id='wumRg'><style id='wumRg'><dir id='wumRg'><q id='wumRg'></q></dir></style></legend>

        <bdo id='wumRg'></bdo><ul id='wumRg'></ul>

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

      1. <tfoot id='wumRg'></tfoot>

      2. <i id='wumRg'><tr id='wumRg'><dt id='wumRg'><q id='wumRg'><span id='wumRg'><b id='wumRg'><form id='wumRg'><ins id='wumRg'></ins><ul id='wumRg'></ul><sub id='wumRg'></sub></form><legend id='wumRg'></legend><bdo id='wumRg'><pre id='wumRg'><center id='wumRg'></center></pre></bdo></b><th id='wumRg'></th></span></q></dt></tr></i><div id='wumRg'><tfoot id='wumRg'></tfoot><dl id='wumRg'><fieldset id='wumRg'></fieldset></dl></div>
      3. Silverlight tabchanged 事件 - tabcontrol

        时间:2023-06-04

            <tbody id='bq8ke'></tbody>
          • <legend id='bq8ke'><style id='bq8ke'><dir id='bq8ke'><q id='bq8ke'></q></dir></style></legend>
            <i id='bq8ke'><tr id='bq8ke'><dt id='bq8ke'><q id='bq8ke'><span id='bq8ke'><b id='bq8ke'><form id='bq8ke'><ins id='bq8ke'></ins><ul id='bq8ke'></ul><sub id='bq8ke'></sub></form><legend id='bq8ke'></legend><bdo id='bq8ke'><pre id='bq8ke'><center id='bq8ke'></center></pre></bdo></b><th id='bq8ke'></th></span></q></dt></tr></i><div id='bq8ke'><tfoot id='bq8ke'></tfoot><dl id='bq8ke'><fieldset id='bq8ke'></fieldset></dl></div>

              <tfoot id='bq8ke'></tfoot>
                  <bdo id='bq8ke'></bdo><ul id='bq8ke'></ul>
                • <small id='bq8ke'></small><noframes id='bq8ke'>

                  本文介绍了Silverlight tabchanged 事件 - tabcontrol的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在使用选项卡控件,我想处理 tabchanged 事件.

                  I'm using tab control and I want to handle tabchanged event.

                  我试图使用 SelectionChanged 事件,但没有成功.它被触发了太多次(在加载选项卡控件或添加新选项卡之后).我只想在用户在选项卡之间导航时处理此事件.

                  I was trying to use SelectionChanged event with no luck. It's being fired too many times (after loading tabcontrol, or adding new tab). I would like to handle this event only when user navigates between tabs.

                  我找到了 WPF 的解决方案(标准 WPF 选项卡控件中是否存在 Selected Tab Changed 事件),但这对 Silverlight 没有好处.TIA.

                  I have found solution for WPF (Is there Selected Tab Changed Event in the standard WPF Tab Control) but it's no good for Silverlight. TIA.

                  推荐答案

                  如果您检查事件中 SelectedIndex 属性的实际更改,则触发太多次"应该不是问题.

                  Firing "too many times" should not be a problem if you check for an actual change to the SelectedIndex property in the event.

                  private int LastSelectedTab = -1;
                  
                  void tab_SelectionChanged(object sender, SelectionChangedEventArgs e)
                  {
                      TabControl tab = sender as TabControl;
                      if (this.LastSelectedTab != tab.SelectedIndex)
                      {
                          this.LastSelectedTab = tab.SelectedIndex;
                          // Now do your thing...
                      }
                  }
                  

                  这篇关于Silverlight tabchanged 事件 - tabcontrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何更改 C# winforms 中未使用空间选项卡的背景颜 下一篇:如何识别控件的可见性是否被用户更改?

                  相关文章

                  最新文章

                    <tfoot id='9Yuue'></tfoot>
                  1. <small id='9Yuue'></small><noframes id='9Yuue'>

                      <bdo id='9Yuue'></bdo><ul id='9Yuue'></ul>
                  2. <legend id='9Yuue'><style id='9Yuue'><dir id='9Yuue'><q id='9Yuue'></q></dir></style></legend>

                    1. <i id='9Yuue'><tr id='9Yuue'><dt id='9Yuue'><q id='9Yuue'><span id='9Yuue'><b id='9Yuue'><form id='9Yuue'><ins id='9Yuue'></ins><ul id='9Yuue'></ul><sub id='9Yuue'></sub></form><legend id='9Yuue'></legend><bdo id='9Yuue'><pre id='9Yuue'><center id='9Yuue'></center></pre></bdo></b><th id='9Yuue'></th></span></q></dt></tr></i><div id='9Yuue'><tfoot id='9Yuue'></tfoot><dl id='9Yuue'><fieldset id='9Yuue'></fieldset></dl></div>