Hi,
We have following scenario:
I have one property in my viewmodel say BindValue - it is binded to Int32EditBox Value in xaml as Value ="{Binding Path=BindValue, UpdateSourceTrigger=PropertyChanged}"
and we also have subsribed to ValueChanging event, where we check some validation and set e.cancel = true if it doesn't satisfy some condition.
Now, the issue is:
Say we have a Int32EditBox control having its value binded as Value ="{Binding Path=BindValue, UpdateSourceTrigger=PropertyChanged}"
Now say the current value displayed in the control is 5 and the range is 1 to 10, and if user enters say value 11, the BindValue setter is called and the value of BindValue is set to 11, and then ValueChanging event gets fired and we check if it is in the range 1 to 10, as 11 is not in the range we give a meesagebox to the user and set e.cancel = true here, and now in this case the BindValue setter is not called and thus BindValue is still at 11 but the control has reverted to value 5 and thus is showing the value 5 (however the binded property BindValue has value 11).
Please let know, how can we solve this inconsistency.
Thanks,
Piyush