在我的 WP7 应用程序中,我有一个填充有按钮的列表框。我配置了“按下”视觉状态,效果很好。但是,我想在列表框滚动时禁用“按下”视觉状态(暂时将其设置为不执行任何操作)。
我创建了一个事件处理程序来检测 ListBox 何时滚动(使用 Peter Torr 的博客条目 此处使用该事件处理程序,如何更改/禁用“按下”视觉状态,并将其返回到最初(通过 XAML)定义的状态? ListBox“生成的项目”模板是按钮控件,它本身是模板化的。使用我自定义的“按下”状态动画,
谢谢!
In my WP7 application, I have a ListBox populated with buttons. I have a 'Pressed' visual state configured, and it works great. However, I would like to disable that 'Pressed' visual state (temporarily set it to do nothing) while the ListBox is scrolling.
I've created an event handler for detecting when the ListBox is scrolling (using Peter Torr's blog entry here. Using that event handler, how can I alter/disable that 'Pressed' visual state, and also return it to its originally (through XAML) defined state? The ListBox 'Generated Items' template is the button control, which itself is templated to use my custom 'Pressed' state animation.
Thanks!
发布评论
评论(1)
这并不是您想要的,但您可以尝试设置
我假设您的目标是防止用户在滚动时单击按钮。
This is not execly what are you looking for, but you can try setting
I assume your goal is to prevent user from clicking a button while scrolling.