I have a path, that is basically a triangle:
<Path Data="M0,0 15,0 15,25" Fill="{Binding Background}"/>
I want to have a data trigger(bound to a bool) that will start an animation that will collapse this triangle when the bool is true, and restore it when it’s false. I have yet to be able to figure out how to do this.
Specifically, collapse along this direction:
0,0 15,0 15,25
5,0 15,0 15,25
10,0 15,0 15,25
15,0 15,0 15,25
Thanks for any help!
Well I did it with little cheat called Expression Blend. But you can see how it’s done. There are always options.
When you have storyboards, you can always change triggers.
As you wanted based on bool value. For example like this:
EDIT
Please keep one more thing in your mind. If you want to apply your trigger dirrectly to element it can be only
EventTrigger.If you want to use a
TriggerorDataTriggeryou have to put it intoStyleorControlTemplate. That is why I addedControlto my second example.