开发者

Adapt animation PathGeometry based on window scaling

I am trying to animate an object along a path. I am using two DoubleAnimationUsingPath to animate its X and Y coordinates, and it works fine. What I would like to do is scale the animation so that when the window size changes the animation changes it proportions as well, adapting to that of the window.

I have tried applying a ScaleTransform to the PathGeometry of the animations开发者_Python百科, with the transform's ScaleX and ScaleY properties bound to a property I added to the window which keeps track of the change in scale after a resize, but it doesn't seem to be working.

Simply put, I would like my animation to scale according to the size of the Window. Is there a simple way to achieve this?


ViewBox control should make the trick in simple scenarios.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜