locked
Animate visible property vs opacity property RRS feed

  • Question

  • I'm learning how to animate objects via Expression Blend 4. I want to make sure I have this correct:

    I can only animate a boolean property such as Visibility using a DiscreteObjectKeyFrame. Since the Visibility property only has 2 states (visible and collapsed) I am not able to use the easing function.

    This is in contrast to animating a property such as Opacity. I can animate the Opacity property using the DoubleAnimationUsingKeyFrames. With this structure I can include the easing functions as well as other effects.

    I would like this verified just because I've spent a couple of hours trying to make on object gradually appear animating the visibility function. However with boolean types properties either the object is visible or collapsed and there is nothing in between.

     

    Thanks,

    Dave

    Saturday, July 24, 2010 10:51 PM

Answers

  • Hi Dave,

    You are correct - if you wanted a gradual fade animation, what you would need to do is to set the visibility to visible and opacity to 0 at time=0, and then fade in the object by animating opacity from t=0 to t=x.

    Thanks,
    Unni


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by WeibEsel Sunday, July 25, 2010 9:10 PM
    Sunday, July 25, 2010 8:37 PM

All replies

  • Hi Dave,

    You are correct - if you wanted a gradual fade animation, what you would need to do is to set the visibility to visible and opacity to 0 at time=0, and then fade in the object by animating opacity from t=0 to t=x.

    Thanks,
    Unni


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by WeibEsel Sunday, July 25, 2010 9:10 PM
    Sunday, July 25, 2010 8:37 PM
  • Thanks for the quick response.

     

    Dave

    Sunday, July 25, 2010 9:10 PM