I have a CheckBox like this-
<CheckBox Command="{Binding Command1}"
CommandParameter="{Binding }"
IsChecked="{Binding Prop1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
When I click it - the IsChecked binding is triggered before the Command execution. It doesn't look like it's due to the order they appear in xaml(I can change it and the execution order stays the same).
Now I'm wondering - is there any place that documents the order of execution for Bindings/Commands? Or maybe there's just a simple guiding rule?
Can I count on the IsChecked binding to always trigger before the Command?
CheckBox
inherits from ToggleButton
, and this answer explains how the Command
is guaranteed to execute after IsChecked
is modified, with examples from the source code. Perhaps this could be marked as a duplicate, but I don't have the reputation to do it.