Transition does not fire when ViewModel changes

Jan 28, 2011 at 8:00 PM
Edited Jan 28, 2011 at 8:01 PM

I have code in MainWindow.xaml  like this

 <transc:TransitionElement.Transition>    
           <transt:CheckerboardTransition/>  
 </transc:TransitionElement.Transition>

<transc:TransitionElement.Content>          
          <ContentControl Content="{Binding Path=CurrentOutputViewModel}" />                
</transc:TransitionElement.Content>  

When the property "CurrentOutputViewModel" changes, I want the transition to fire. But it does not fire.  (it fires only for the first time when the View loads).  Do I need to implement anything more (like custom content panel etc), to make this work whenever the ViewModel changes?

I was under the impression that whenever the "content" changes (or updates in WPF) the transition fires. But it does not. 


Thanks

Dec 6, 2011 at 6:03 PM

Hi there,

in fact the content does not change. It is always the same ContentControl in your example. 
Can't you bind the TransitionElement.Content directly to your CurrentOutputViewModel property?

Greetings,
Jens