gpt4 book ai didi

windows-phone-7 - 如何在 Windows Phone 7 的列表框中禁用触摸选择?

转载 作者:行者123 更新时间:2023-12-04 22:37:10 24 4
gpt4 key购买 nike

在 XAML 模板中,我使用了一个列表框来填充一些动态数据。

现在我想在 Windows Phone 7 的某些列表框项目中禁用触摸选择。怎么做?

我做了一些小调查,有人说可以在列表框中阻止选择事件。

http://social.msdn.microsoft.com/forums/en-US/wpf/thread/8eeed347-ede5-4a24-88f1-953acd16e774

希望有聪明的人能教我如何解决这个问题。

谢谢。

最佳答案

您可以使用 ItemsControl 而不是 ListBox。 ItemsControl 就像 ListBox,但它没有选择的东西。

<ItemsControl>
<ItemsControl.ItemTemplate>
<DataTemplate>
...
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>

关于windows-phone-7 - 如何在 Windows Phone 7 的列表框中禁用触摸选择?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4048815/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com