WPF panel slide in from left animation

爷,独闯天下 提交于 2019-12-05 11:55:00
BradleyDotNET

Don't animate properties like "Width", that is what RenderTransforms are for.

To get the behavior you describe ("Sliding in") you want to animate a TranslateTransform from some X off the screen/page to the final position.

To get the behavior your XAML and the rest of your post indicates, you would use a ScaleTransform with the origin set to the left hand side of the panel.

You should also know that the targeting of render transforms can be a little tricky, see this question for more information

Here is the documentation for RenderTransforms (MSDN)

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