开发者

Constrain animation within Grid

开发者 https://www.devze.com 2023-02-21 20:57 出处:网络
I have a project that is WPF4 (with vb.net behind). I have a window that is full screen, and in the center of it is a grid that is constrained to 640x480 in size. I have five images animated, and the

I have a project that is WPF4 (with vb.net behind). I have a window that is full screen, and in the center of it is a grid that is constrained to 640x480 in size. I have five images animated, and the animation should take them off the grid and out of sight. However, the anim开发者_开发问答ation shows the image when off the grid (over the window itself.) How do I contrain my animations to stay ONLY inside of the grid?


Grid.ClipToBounds = true;

That should clip the contents within the Grid as it moves past the bounds of the Grid.

0

精彩评论

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