Sliding transition animation between Screens in Ca

2019-07-19 03:06发布

问题:

In Silverlight (or WPF) application, I have a Conductor which is a Conductor.Collection.OneActive

What is a good way to animate a transition between screens (I'd like a simple slider) when I call ActivateItem(...)?

P.S. In my non-Caliburn apps I have used both TransitionPresenter controls of different makers or State Manager animations.

Edit: From Rob's answer, TransitionPresenter IS the way to go in the described situation. It maps nicely to the "default" Caliburn way of using ContentControl for switching views by manipulating view models. TransitionPresenter is essentially a ContentControl with animations.

At the same time, manipulating ActiveItem means having a state, and if you try to use State Manager with its own state at the same time, there is a problem of synchronizing these two states, so it is not a good fit.

回答1:

You can still use a transition control. Just add the View.Model attached property to it.