【问题标题】:Cancel WinRT ComboBox infinte scroll effect取消 WinRT ComboBox 无限滚动效果
【发布时间】:2014-11-10 10:59:19
【问题描述】:

如何在 WinRT 中取消 ComboBox 的无限滚动效果。我尝试了很多解决方案,但似乎没有一个有效。

PS:我只在触摸模式下遇到了这个问题!

谢谢,

【问题讨论】:

  • 你有代码吗?
  • 只是一个包含项目的组合框!
  • 还有多少项?我添加了一个包含 12 个项目的 ComboBox,并且没有无限滚动效果。
  • 我忘了确切地说这个效果只在触摸模式下

标签: winrt-xaml


【解决方案1】:

您需要将ItemsPanelTemplate 更改为StackPanel

<ComboBox Width="200" Height="50">
    <ComboBoxItem Content="Test"/>
    <ComboBox.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Vertical" />
        </ItemsPanelTemplate>
    </ComboBox.ItemsPanel>
</ComboBox>

【讨论】:

猜你喜欢
  • 2020-10-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-17
  • 1970-01-01
相关资源
最近更新 更多