可以使用FluidMoveBehavior吗? [英] Is FluidMoveBehavior available?
问题描述
我在尝试制作动画的代码中调用了Grid.SetRow和Grid.SetColumn.根据 http:上的答案: //social.msdn.microsoft.com/Forums/zh-CN/wpf/thread/257779f7-b459-43fc-a4a1-f24641c50e09 ,建议使用FluidMoveBehavior,但看起来不像Windows 8可用.
I have calls to Grid.SetRow and Grid.SetColumn in my code which I'm trying to animate. According to the answer at http://social.msdn.microsoft.com/Forums/en-CA/wpf/thread/257779f7-b459-43fc-a4a1-f24641c50e09, it is recommended to make use of FluidMoveBehavior, but it doesn't look like this is available for Windows 8.
当网格的子项位置改变时,我可以为它们做些什么选择?我基本上是在寻找一种实现线性过渡的方法.
What are my options for animating the children of a Grid when their positions change? I'm basically looking for a way to achieve linear transition.
推荐答案
There is a new built-in feature called Transitions that can be used, here is an intro. Try adding a RepositionThemeTransition to the grids ChildrenTransitions then items will animate when you change their row or column.
<Grid.ChildrenTransitions>
<TransitionCollection>
<RepositionThemeTransition/>
</TransitionCollection>
</Grid.ChildrenTransitions>
这篇关于可以使用FluidMoveBehavior吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!