1

Is there a way to copy-paste an control and keep all of its keyframes?

Everything I've tried will copy the control and have a completely blank animation for the copied control. This seems like it would be easily done by manually editing Xaml, but is there a way to do it from the Blend UI?

I'm using the new VS 2012 Blend Preview+Sketchflow, but I've tried in VS 2012 Blend and Blend 4 also with no luck.

jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182

1 Answers1

1

When you're copying the Control, you're just copying the object, if you want the animations ('StoryBoard') you'll have to grab those separately from the Resources which don't appear in the Objects and Timeline Panel so they can't be selected like a standard object.

What you could do though, is if you're trying to re-use the same StoryBoard in multiple places, place the StoryBoard in a Resource Dictionary available globally then you don't have to worry about copying it to each instance. Hope this helps.

Chris W.
  • 22,835
  • 3
  • 60
  • 94
  • Well, it's not an entire storyboard, but just a single animation within the storyboard. Is there a way to copy a control and make copies of any animations with `Storyboard.TargetName` set to that control as well? – jonathanpeppers Jan 31 '13 at 17:49
  • Hmm, you would think so but not that I'm aware of without copying that storyboard and making it unique to the new target instance. Unless maybe you could expose it as a dependency property and bind the value in the storyboard perhaps? Sorry, I know that's not exactly the answer you were probably hoping for, guess I misunderstood the question a bit. – Chris W. Jan 31 '13 at 19:17
  • Thanks though. I'm thinking I could potentially write a C# extension to Blend to do what I want, I think it may be the only option. – jonathanpeppers Jan 31 '13 at 19:37