This project is read-only.

Transition does not fire when ViewModel changes

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

I have code in MainWindow.xaml  like this


          <ContentControl Content="{Binding Path=CurrentOutputViewModel}" />                

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. 


Dec 6, 2011 at 7: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?