Is FluidMoveBehavior available?

坚强是说给别人听的谎言 提交于 2019-12-07 15:32:54

问题


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.


回答1:


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>


来源:https://stackoverflow.com/questions/12998837/is-fluidmovebehavior-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!