views:

21

answers:

1

Hi

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

Thx

+1  A: 

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.

Rune Grimstad