MultiDataTrigger is applied when all conditions are not satisfied, so your MultiDataTrigger does not work.
Either have four separate triggers, or put the condition in a separate logical property, such as
bool ShowAssessment { return Value == 301 || Value == 302 ... }
raise a property change notification for ShowAssessment when the value changes
eg
int Value { get{ return _value; } set { _value = value; RaisePropertyChanged("Value"); RaisePropertyChanged("ShowAssessment"); } }
and then click on ShowAssessment.
Perhaps the best solution is to add a HeaderText property with a switch statement that returns the correct header text based on Value
. Then just bind the title text to this. Triggers are not required.
source share