我觉得没有必要判断边界吧, 你可以对Ellipse的Canvas.Left属性应用DoubleAnimation,从左到右移动的动画就可以, 比如你的Canvas 宽度是100, 你的Ellipse 宽度是10, 那么你就让 Canvas.Left属性从0- 95之间不停的循环动画就可以。
不过可能做边界的值要考究一下有可能要用2个storyboard
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
![]()