Topics: Questions
Nov 14, 2014 at 12:31 PM

I try to trigger a validation OnViewModelPropertyChanged
protected override void OnViewModelPropertyChanged(IViewModel viewModel, string propertyName)
            base.OnViewModelPropertyChanged(viewModel, propertyName);

            if (viewModel is PlaceViewModel)
                if (TagHelper.AreTagsEqual(propertyName, "SelectedUnit"))
My problem: In nested viewmodel I ask the value of SelectedUnit from model. But the SelectedUnit has the the old value.

The value in viewmodel changed immidiately but the value in model is changed later.

How to get the new value in ValidateBusinesRules?
Nov 17, 2014 at 9:48 AM
Maybe its possible to add an InterestedIn on Model instead of Viewmodel?
Nov 17, 2014 at 10:05 AM
Ok. I think the notification wrapper is my solution
Nov 19, 2014 at 10:26 AM
The problem is:

First the Property in viewmodel starts the validation and after I have to start the validation again if the property is changed in the model.
Nov 19, 2014 at 10:41 AM
If you map them using [Model] and [ViewModelToModel], Catel will automatically take care of this for you.