I have a simple WPF application that contains a user control that animates internally and externally with a couple of storyboards in the main window. I animate the opacity of the user controls, scaletransform.scalex and scaletransform.scaley, to get it out and out of sight. It looks cool except for the first launch. The animation is set to 3/10 seconds, although I increased it during testing. I tried to set the default value to a split second to see if there is a problem when the values of the properties that I am animating do not warp as expected. It did nothing. I even explicitly call my animation “hide” on the loaded window to see if this helps me set the default values, but that didn't work either. Is there some kind of initialization that the runtime is doing,when do i start the animation? Is there a way to explicitly call such initialization before showing the user interface? The symptom is that the control is not displayed even up to 2/10 seconds in the first animation. Sometimes it’s longer, and the control appears after it is fully animated (opacity and size are their final values when they finally appear).
source
share