如何自定义 SurfaceListBox 中多个项目的选择
我有一个包含许多项目的 surfaceListBox。 当我将 SelectionMode 设置为 multiple 时,一切都很好,我单击一个项目将其添加到 SelectionItems, 但我想获得相同的行为,但不是点击项目,而是当触摸在项目上移动时, 以下是我要添加的操作的一些细节:
如果触摸在 surfacelistboxitem 上移动,则该项目将添加到 selectedItems 中。 感谢您的帮助
I have a surfaceListBox that contains many items.
when I put the SelectionMode to multiple , every thing is fine and I click on an item to add it to the selectionItems,
But I want to get the same behaviour but not with clicking on the items but when the touch is moving over the item ,
Here is some details of the manipulation I want to add:
if the touch is moving over a surfacelistboxitem , this item is added to the selectedItems .
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SurfaceListBox 不支持这一点,因为它需要将移动手指视为滚动。
如果您不需要滚动功能,则可以放弃 SurfaceListBox,转而使用充满 SurfaceToggleButton 元素的 StackPanel。在这些切换按钮上,设置 ClickMode=Hover,以便只需将手指移到它们上方即可进行切换。
-Robert(Surface 控制装置前任 PM)
SurfaceListBox doesn't support this because it needs to treat moving fingers as scrolling.
If you don't need the ability to scroll, you can ditch SurfaceListBox and instead use a StackPanel filled with SurfaceToggleButton elements. On those toggle buttons, set ClickMode=Hover so that they will toggle just by moving your finger over them.
-Robert (former PM for the Surface controls)