TransitionPresenter - Cancel a Transition

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 9 years ago by Phil Devaney


We are planning to use TransitionPresenter with a custom Transition that provides 'swipe'-like functionality in response to touch events.. In particular the transition will follow the user's finger, if the finger is stopped then the transition will stop, if the finger is moved backwards then the transition will go backwards. Once the TouchUp event is raised, then the transition will complete like a normal animated transition, unless the position is less than a certain threshold, in which case the transition will revert to the original ('from') content, preferably animated as well.

We have implemented most of this functionality with a custom Transition, but are unable to do the last part (reverting to the 'from' content). Would it be possible to get a new CancelTransition method added to the Transition class to achieve this?


Note we also want to use standard animated transitions when the content change is triggered through other means (e.g. buttons), which is why we want to use TransitionPresenter instead of implementing something custom.



Phil Devaney

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Phil,

Instead of a CancelTransition() method of sorts, could you do something like call Transition.GetOppositeTransition() and execute that?  That method returns a variation of the transition that can be used for backing out a content that was inserted into the presenter using the original transition.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.