If we toggle a widgets visibility, it is easy to play an animation when the widget becomes visible.
But if we toggle off the visibility, we would have to call a special function/event to play an animation, then when the animation is finished, adjust the visibility of the widget.
I wonder if there is not a way to override what happens when visibility is changed to hidden/collapsed, so that we can run an animation before actually changing the visibility state?
A similar case is that we can override the On Preview Key down. Does anything like that exist for overriding the desired visibility state?