Open decademoon opened 7 years ago
I came across this as well. I would be interested in a "clean" solution too 👍
@MartinZikmund, I was having the same issue. After hours of troubleshooting, it ended up being that the DataTriggerBehavior
was not functioning correctly inside a ControlTemplate
. I took it out of the 'ControlTemplate' and the initial binding started working.
Is this intended behavior?
Consider the following:
The visual state won't be set correctly until
Vm.IsLiked
actually changes value.If this is intended behavior, then what is the best way for me to trigger an evaluation? Should I raise a property changed event for
IsLiked
in my view model at some point? I can't do it in the VM's constructor because there are no registered listeners yet.