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

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

    • <bdo id='ImLwV'></bdo><ul id='ImLwV'></ul>

    <tfoot id='ImLwV'></tfoot>

        scrollviewer 内的 Listview 防止 scrollviewer 滚动

        Listview inside of scrollviewer prevents scrollviewer scroll(scrollviewer 内的 Listview 防止 scrollviewer 滚动)

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

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

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

                  本文介绍了scrollviewer 内的 Listview 防止 scrollviewer 滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个滚动查看器,里面有几个列表框.问题是如果用户在鼠标悬停在列表视图上时使用鼠标中键滚动滚动查看器.listview 将其内部的 scrollviewer 滚动到底部,然后继续捕获鼠标,从而阻止包含的 scrollviewer 滚动.

                  I have a scrollviewer with a couple listboxes in it. The problem is if a user uses the middle mouse roller to scroll the scrollviewer while their mouse is over a listview. The listview scrolls its internal scrollviewer to the bottom and then continues to capture the mouse, preventing the containing scrollviewer from scrolling.

                  关于如何处理这个问题的任何想法?

                  Any ideas on how to handle this?

                  推荐答案

                  这是因为 ListView 的(实际上是 ListBox 的)内容模板包装了它的项目ScrollViewer 本身.

                  That happens because the ListView's (ListBox's, actually) content template wraps its items with a ScrollViewer by itself.

                  最简单的方法是通过为内部 ListView 删除自己的 Template 来禁用它,它不会创建 ScrollViewer:

                  The simplest way is to disable it by dropping your own Template for the inside ListView, one that doesn't create a ScrollViewer:

                      <ListView>
                        <ListView.Template>
                          <ControlTemplate>
                            <ItemsPresenter></ItemsPresenter>
                          </ControlTemplate>
                        </ListView.Template>
                        ...
                      </ListView>
                  

                  顺便说一句,如果您在 ListView 中有一个 ListView(这是我的情况),也会发生同样的情况.

                  BTW the same happens if you have a ListView inside a ListView (this was my case).

                  这篇关于scrollviewer 内的 Listview 防止 scrollviewer 滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)

                        <tbody id='qCsf9'></tbody>

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

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