在 wp7 上展开网格单元
我正在 wp7 上使用
和
设置大小的 3 x 3 网格。当有人点击某个单元格时,我希望该单元格占据整个 3 x 3 空间(因此现在网格为 1 x 1)。此外,当发生这种情况时,我需要将其设置为缓慢放大或类似的动画。
有什么想法我应该从哪里开始吗?
I am setting up a 3 x 3 grid on a wp7 using <grid>
and <row/columnDefinitions>
for size. When someone taps on a cell, I want the cell to take up the entire 3 x 3 space (so now the grid is 1 x 1). Also when this happens, I need to animate this as a slow zoom up or something similar.
Any ideas where i should I start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有确切的答案,但可以记下我最初的想法,对你有帮助。
RowDefinition 和 ColumnDefinition 的 Height 和 Width 属性似乎是依赖属性,这意味着您可以使用情节提要为它们设置动画。您可以创建九个故事板(每个网格一个),也可以在代码中修改一个故事板以实现所需的动画。
另一种方法可能是使用视觉状态管理器,每个单元格具有单独的状态,您可以通过更改行和列定义来实现您想要的效果。也有点乏味,因为您需要十个状态。
I don't have an exact answer but can note down my initial thoughts that could help you.
It appears the Height and Width properties of RowDefinition and ColumnDefinition are Dependency properties which means you can animate them with a storyboard. You could either create nine storyboards (one for each grid) or one storyboard that you modify in code for the animation required.
Another approach could be using the Visual State Manager, with separate states for each cell you could achieve the effects you're after by altering the row and column definitions. Bit tedious as well since you'll need ten states.