views:

13

answers:

1

I'd like to create a slide-down animation for an Grid element in my WPF (.net 4.0) application. I assumed that I could do the following:

  1. create a visual state (closed, renderTranslate.y=-ActualHeight, solved via Binding with converter)
  2. create a visual state (open, renderTranslate.y=0)
  3. create a container to clip the animation
  4. use the default transition

However the binding in (1) seems to be ignored / not evaluated. Apparently VisualStates and Storyboards do not allow DataBinding (however SL4 seems to support them). Any other ideas how to achieve this slide down effect in a XAML-ish way?

A: 

An alternative idea I just had: I could write a custom shader that works with relative translation parameters instead of absolute ones. Seems a little bit heavy though.

Marcel J.