Is it possible to bind a C# Storyboard Object on an Image in xaml?
问题 I would like to create a Storyboard in my ViewModel like this: public void OnEventHandler(DrehtellerMoved e) { int angle = e.steps * 72; myStoryboard = new Storyboard(); myStoryboard.Duration = new Duration(TimeSpan.FromMilliseconds(e.speed); DoubleAnimation myAnimation = new DoubleAnimation() { By = angle, Duration = storyboard.Duration }; Storyboard.SetTargetProperty(myAnimaiton, new PropertyPath("(UIElement.RenderTransform).(RotateTransform.Angle)")); Storyboard.SetTarget(myAnimation,