开发者

Stopping a TranslateTransform when the checkbox is unchecked

I have a translation transformation in C# WPF that starts when a checkbox is ticked,开发者_Python百科 and I would like it to stop when you uncheck the checkbox, naturally. How do I do this?

Thx


I'm guessing that you have an animation contained in a Storyboard that animates properties of the TranslateTransform? In that case you have two methods on the Storyboard: Begin and Stop.

In this case the simplest solution to your problem is to call either Storyboard.Begin or Storyboard.Stop in the Checkbox.Clicked event handler.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜